Python threads and Numeric/SciPy exploit Dual Core ?
Fredrik Lundh
fredrik at pythonware.com
Mon Oct 2 08:06:40 EDT 2006
Oeyvind Brandtsegg wrote:
> I've been trying to make my music app use dual core,
> and would very much like some more detailed information on this.
>
> Excuse my lack of knowledge,
> but how do I explicitly release the GIL ?
http://docs.python.org/api/threads.html
> I haven't learned this, but have found through experimentation that I
> can release a thread by using time.sleep(0) inside a thread's "run
> while true" loop. This seems to create an interrupt, and give other
> threads a chance to do their thing.
that (momentarily) blocks the current thread, and forces a rescheduling.
</F>
More information about the Python-list
mailing list