On Sun, Oct 9, 2011 at 9:01 PM, mark florisson <markflorisso...@gmail.com> wrote: > On 9 October 2011 19:54, Jon Olav Vik <jono...@gmail.com> wrote: >> Personally, I think I'd prefer context managers as a very >> readable way to deal with parallelism > > Yeah it makes a lot of sense for mutual exclusion, but 'master' really > means "only the master thread executes this peace of code, even though > other threads encounter the same code", which is more akin to 'if' > than 'with'.
I see your point. However, another similarity with "with" statements as an encapsulated "try..finally" is when there's a barrier at the end of the block. I can live with some magic if it saves me from having a boilerplate line of "barrier" everywhere 8-) _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel