[wxPython-users] Re: Threads in wx
Robin Dunn
robin at alldunn.com
Tue Nov 6 09:35:12 PST 2007
Bryan Cole wrote:
> On Mon, 2007-11-05 at 22:12 -0800, Tony Cappellini wrote:
>> "calls to sleep() block", (don't call sleep when using python threads)
>
> Well by definition, calls to sleep *should* block the calling thread!
> However, sleep also releases the global interpreter lock, allowing other
> threads to run while the sleeping thread err.. sleeps. I can't see any
> reason why sleep() and threads are incompatible.
And specifically in the case of the demo, a blocking sleep is exactly
what is wanted. Other threading situations will have different needs.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list