R
Richard Townsend
I've been experimenting putting a reference to a function into a Queue
object and was wondering what actually gets put in the Queue - is it the
function's code object?
If I read from the Queue in a different module, it appears that I don't
need to import the module that defines the function - or any module that it
uses - is this generally true, or are there some conditions to be aware of?
The scenario I'm working on has child threads doing some tasks and then
sending back tuples (done, function, args, kwargs) via the Queue, to be
called in the main thread. The Python code is ultimately embedded in a
C/Motif app.
object and was wondering what actually gets put in the Queue - is it the
function's code object?
If I read from the Queue in a different module, it appears that I don't
need to import the module that defines the function - or any module that it
uses - is this generally true, or are there some conditions to be aware of?
The scenario I'm working on has child threads doing some tasks and then
sending back tuples (done, function, args, kwargs) via the Queue, to be
called in the main thread. The Python code is ultimately embedded in a
C/Motif app.