Johannes Bauer wrote at 2021-12-6 00:50 +0100:
>I'm a bit confused. In my scenario I a mixing threading with
>multiprocessing. Threading by itself would be nice, but for GIL reasons
>I need both, unfortunately. I've encountered a weird situation in which
>multiprocessing Process()es which are start
> On 5 Dec 2021, at 23:50, Johannes Bauer wrote:
>
> Hi there,
>
> I'm a bit confused. In my scenario I a mixing threading with
> multiprocessing. Threading by itself would be nice, but for GIL reasons
> I need both, unfortunately. I've encountered a weird situation in which
> multiprocessing
Am 06.12.21 um 13:56 schrieb Martin Di Paola:
> Hi!, in short your code should work.
>
> I think that the join-joined problem is just an interpretation problem.
>
> In pseudo code the background_thread function does:
>
> def background_thread()
> # bla
> print("join?")
> # bla
> print("j
Hi!, in short your code should work.
I think that the join-joined problem is just an interpretation problem.
In pseudo code the background_thread function does:
def background_thread()
# bla
print("join?")
# bla
print("joined")
When running this function in parallel using threads, you
Hi there,
I'm a bit confused. In my scenario I a mixing threading with
multiprocessing. Threading by itself would be nice, but for GIL reasons
I need both, unfortunately. I've encountered a weird situation in which
multiprocessing Process()es which are started in a new thread don't
actually start
On 24 Oct 2009, at 21:37, larudwer wrote:
"Brian Quinlan" schrieb im Newsbeitrag
news:mailman.1895.1256264717.2807.python-l...@python.org...
Any ideas why this is happening?
Cheers,
Brian
IMHO your code is buggy. You run in an typical race condition.
consider following part in your code
"Brian Quinlan" schrieb im Newsbeitrag
news:mailman.1895.1256264717.2807.python-l...@python.org...
>
> Any ideas why this is happening?
>
> Cheers,
> Brian
IMHO your code is buggy. You run in an typical race condition.
consider following part in your code:
> def _make_some_processes(q):
>
On 24 Oct 2009, at 19:49, Gabriel Genellina wrote:
En Sat, 24 Oct 2009 02:48:38 -0300, Brian Quinlan
escribió:
On 24 Oct 2009, at 14:10, Gabriel Genellina wrote:
En Thu, 22 Oct 2009 23:18:32 -0300, Brian Quinlan > escribió:
I don't like a few things in the code:
I'm actually not looking f
En Sat, 24 Oct 2009 02:48:38 -0300, Brian Quinlan
escribió:
On 24 Oct 2009, at 14:10, Gabriel Genellina wrote:
En Thu, 22 Oct 2009 23:18:32 -0300, Brian Quinlan
escribió:
I don't like a few things in the code:
I'm actually not looking for workarounds. I want to know if this is a
multip
Hi Brian,
I think there could be a slight problem (if I've understood your code).
> import multiprocessing
> import queue
>
> def _process_worker(q):
> while True:
do you really want to run it indefinitely here?
> try:
> something = q.get(block=True, timeout=0.1)
> exc
On 24 Oct 2009, at 14:10, Gabriel Genellina wrote:
En Thu, 22 Oct 2009 23:18:32 -0300, Brian Quinlan
escribió:
I don't like a few things in the code:
def _do(i):
print('Run:', i)
q = multiprocessing.Queue()
for j in range(30):
q.put(i*30+j)
processes = _make_some_p
En Thu, 22 Oct 2009 23:18:32 -0300, Brian Quinlan
escribió:
I don't like a few things in the code:
def _do(i):
print('Run:', i)
q = multiprocessing.Queue()
for j in range(30):
q.put(i*30+j)
processes = _make_some_processes(q)
while not q.empty():
p
On 24 Oct 2009, at 06:01, paulC wrote:
Hey Paul,
I guess I was unclear in my explanation - the deadlock only happens
when I *don't* call join.
Cheers,
Brian
Whoops, my bad.
Have you tried replacing prints with writing a another output Queue?
I'm wondering if sys.stdout has a problem.
Re
>
> Hey Paul,
>
> I guess I was unclear in my explanation - the deadlock only happens
> when I *don't* call join.
>
> Cheers,
> Brian
Whoops, my bad.
Have you tried replacing prints with writing a another output Queue?
I'm wondering if sys.stdout has a problem.
Regards, Paul C.
--
http://mail
On 24 Oct 2009, at 00:02, paulC wrote:
On Oct 23, 3:18 am, Brian Quinlan wrote:
My test reduction:
import multiprocessing
import queue
def _process_worker(q):
while True:
try:
something = q.get(block=True, timeout=0.1)
except queue.Empty:
retu
On Oct 23, 3:18 am, Brian Quinlan wrote:
> My test reduction:
>
> import multiprocessing
> import queue
>
> def _process_worker(q):
> while True:
> try:
> something = q.get(block=True, timeout=0.1)
> except queue.Empty:
> return
> else:
>
My test reduction:
import multiprocessing
import queue
def _process_worker(q):
while True:
try:
something = q.get(block=True, timeout=0.1)
except queue.Empty:
return
else:
print('Grabbed item from queue:', something)
def _make_som
17 matches
Mail list logo