On Fri, 04 Sep 2009 00:47:18 PDT David Leimbach <[email protected]> wrote: > On Fri, Sep 4, 2009 at 12:11 AM, Bakul Shah > <[email protected]<bakul%[email protected]> > > wrote: > > > But this has no more to do with parallelism than any other > > feature of C. If you used __block vars in a block, you'd > > still need to lock them when the block is called from > > different threads. > > > I just wrote a prime sieve with terrible shutdown synchronization you can > look at here: > > http://paste.lisp.org/display/86549
Not sure how your program invalidates what I said. Blocks do provide more syntactic sugar but that "benefit" is independent of GCD (grand central dispatch) or what have you. Given that __block vars are shared, I don't see how you can avoid locking if blocks get used in parallel.
