Nikita Pchelin nikita.pche...@gmail.com added the comment:
(note these aren't threads, but processes)
Fair enough, I should be more careful with terminology.
Ok, can you try to move the getLogger call from _Producer.__init__
to, _Producer.run?, (same for _Consumer)
Yes, that seems to work
Nikita Pchelin nikita.pche...@gmail.com added the comment:
Fair enough. Thanks for help with investigating this issue!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13569
Nikita Pchelin nikita.pche...@gmail.com added the comment:
Here is a link for example in question:
https://github.com/jango/calculon/blob/master/calculon/calculon.py
Previously, I would pass logger instance from Calculon class to
_Producer and _Consumer classes. In the current revision, I
New submission from Nikita Pchelin nikita.pche...@gmail.com:
I've wrote a little application that uses multiprocessing module:
https://github.com/jango/PC/blob/master/pc/pc-example.py
When I run it in my Linux setup, I get the expected output (Python 2.7.1+):
2011-12-09 14:16:29,014 Started
Nikita Pchelin nikita.pche...@gmail.com added the comment:
I am not sending locks explicetly (i.e. I am not using locks), but I do
pass a Queue object from PC instance to _Consumer and _Producer instances
that get/put values from/to the queue -- this is done deliberately.
2011/12/9 Antoine
Nikita Pchelin nikita.pche...@gmail.com added the comment:
It's multiprocessing Queue:
from multiprocessing import Process, Queue, Event
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13569
Nikita Pchelin nikita.pche...@gmail.com added the comment:
Hi Antoine,
* If I don't pass a logger and do print statements instead, works like a
charm.
* If I getLogger() in the child instead, example fails with the same trace.
However, according to this ( http://docs.python.org/library
Nikita Pchelin nikita.pche...@gmail.com added the comment:
Are you sure you don't store the logger in your process' __init__
method? The __init__ method is called in the parent and the process
instance is transfered to the child when you call start() on the process.
To make sure we