On Mon, 15 Jun 2009 05:37:14 -0700 (PDT) OdarR <olivier.da...@gmail.com> wrote:
> On 13 juin, 07:25, Mike Kazantsev <mk.frag...@gmail.com> wrote: > > There was quite interesting explaination of what happens when you send > > ^C with threads, posted on concurrency-sig list recently: > > > > http://blip.tv/file/2232410 > > http://www.dabeaz.com/python/GIL.pdf > > > > Can be quite shocking, but my experience w/ threads only confirms that. > > Hi there, > please read this package page (in 2.6), this is very interesting. > http://docs.python.org/library/multiprocessing.html > > I tested it : it works. Multi-core cpu's are happy :-) I'd certainly prefer using processes because they indeed work flawlessly in that respect, but threads are way simplier and much more integrated into the language, so I can avoid re-imlementing tons of shared stuff, IPC and locking by using threads which bassically run in the same context. That might mean 90% of code for trivial but parallel task. Alas, they don't work flawlessly in all cases, but there is still million and one use for them. -- Mike Kazantsev // fraggod.net
signature.asc
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list