returning a value from a thread

Ken Godee ken at perfect-image.com
Wed Jul 14 22:50:09 EDT 2004


Jeff Shannon wrote:
> Ken Godee wrote:
> 
>> I'm weaving quite a snake here already, there's even more modules
>> in the flow then what I've mentioned, including GUI stuff.
>> Didn't want to rewrite or make it tougher than need be just
>> to get a single value back to module1.
> 
> 
> 
> You may want to look further into your GUI toolkit, as well.  I know 
> that wxPython has a thread-safe way of sending messages to a particular 
> window (wxPostEvent), which can be used to signal task completion.  I 
> don't specifically know about other toolkits, but I wouldn't be  at all 
> surprised if this is a common feature, since signalling worker-thread 
> completion *is* a fairly common task in GUI programs.

Using PyQt here. Looked into QThreads already.
Also already using python threads and don't want to mix.
Been testing out using a Queue this evening and is working
perfectly.

Thanks,
Ken



More information about the Python-list mailing list