Re: Threading plus multiprocessing plus cv2 error

2020-09-03 Thread Python
On Sat, Aug 29, 2020 at 06:24:10PM +1000, John O'Hagan wrote: > Dear list > > Thanks to this list, I haven't needed to ask a question for > a very long time, but this one has me stumped. > > Here's the minimal 3.8 code, on Debian testing: > > - > from multiprocessing import Process > from th

Re: Threading plus multiprocessing plus cv2 error

2020-09-01 Thread John O'Hagan
On Sun, 30 Aug 2020 09:59:15 +0100 Barry Scott wrote: > > > > On 29 Aug 2020, at 18:01, Dennis Lee Bieber > > wrote: > > > > On Sat, 29 Aug 2020 18:24:10 +1000, John O'Hagan > > declaimed the following: > > > >> There's no error without the sleep(1), nor if the Process is > >> started befor

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Stephane Tougard via Python-list
On 2020-08-30, Barry wrote: >* The child process is created with a single thread—the one that > called fork(). The entire virtual address space of the parent is > replicated in the child, including the states of mutexes, > condition variables, and other pthr

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Barry
> On 30 Aug 2020, at 11:03, Stephane Tougard via Python-list > wrote: > > On 2020-08-30, Chris Angelico wrote: >>> I'm not even that makes sense, how 2 processes can share a thread ? >>> >> They can't. However, they can share a Thread object, which is the >> Python representation of a threa

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Stephane Tougard via Python-list
On 2020-08-30, Chris Angelico wrote: >> I'm not even that makes sense, how 2 processes can share a thread ? >> > They can't. However, they can share a Thread object, which is the > Python representation of a thread. That can lead to confusion, and > possibly the OP's error (I don't know for sure,

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Barry Scott
> On 29 Aug 2020, at 18:01, Dennis Lee Bieber wrote: > > On Sat, 29 Aug 2020 18:24:10 +1000, John O'Hagan > declaimed the following: > >> There's no error without the sleep(1), nor if the Process is started >> before the Thread, nor if two Processes are used instead, nor if two >> Threads ar

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread John O'Hagan
On Sat, 29 Aug 2020 13:01:12 -0400 Dennis Lee Bieber wrote: > On Sat, 29 Aug 2020 18:24:10 +1000, John O'Hagan > declaimed the following: > > >There's no error without the sleep(1), nor if the Process is started > >before the Thread, nor if two Processes are used instead, nor if two > >Threads

Re: Threading plus multiprocessing plus cv2 error

2020-08-30 Thread Karen Shaeffer via Python-list
> On Aug 29, 2020, at 10:12 PM, Stephane Tougard via Python-list > wrote: > > On 2020-08-29, Dennis Lee Bieber wrote: >> Under Linux, multiprocessing creates processes using fork(). That means >> that, for some fraction of time, you have TWO processes sharing the same >> thread and all t

Re: Threading plus multiprocessing plus cv2 error

2020-08-29 Thread Chris Angelico
On Sun, Aug 30, 2020 at 4:01 PM Stephane Tougard via Python-list wrote: > > On 2020-08-29, Dennis Lee Bieber wrote: > > Under Linux, multiprocessing creates processes using fork(). That > > means > > that, for some fraction of time, you have TWO processes sharing the same > > thread and al

Re: Threading plus multiprocessing plus cv2 error

2020-08-29 Thread Stephane Tougard via Python-list
On 2020-08-29, Dennis Lee Bieber wrote: > Under Linux, multiprocessing creates processes using fork(). That means > that, for some fraction of time, you have TWO processes sharing the same > thread and all that entails (if it doesn't overlay the forked process with > a new executable, they a

Threading plus multiprocessing plus cv2 error

2020-08-29 Thread John O'Hagan
Dear list Thanks to this list, I haven't needed to ask a question for a very long time, but this one has me stumped. Here's the minimal 3.8 code, on Debian testing: - from multiprocessing import Process from threading import Thread from time import sleep import cv2 def show(im, title, locat