Re: Putting function references in a Queue

2005-08-10 Thread Richard Townsend
On Tue, 09 Aug 2005 23:46:22 GMT, Bryan Olson wrote: > I think that's a good thing to do. The tricky part is getting an > event loop to wait on both the queue and other kinds of events. > Periodic polling works, but kind of sucks. > > What's the 'done' argument? A lock maybe? 'done' is just a bo

Re: Putting function references in a Queue

2005-08-09 Thread Bryan Olson
Richard Townsend wrote: > 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? It's a Python-internal-reference-thingy. > If I read from the Queue in a different module, it a

Re: Putting function references in a Queue

2005-08-06 Thread Benjamin Niemann
Richard Townsend wrote: > 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? No, it's justa referenceto the function object. > If I read from the Queue in a different module,

Re: Putting function references in a Queue

2005-08-06 Thread tiissa
Richard Townsend wrote: > 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? It would simply be the entire function object (unless you choose it otherwise). > If I read from t

Putting function references in a Queue

2005-08-06 Thread 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 a