robb/Underscore.m — pull request #8 by m0wfo (2012-05-17 15:42:36+00:00)
Title: suggested fix for issue re: using GCD for 'map' and 'each'

Feel free to change DISPATCH_QUEUE_CONCURRENT to NULL for compatibility; I found mapping items concurrently gives segfaults all the time as the NSMutableArray has been alloc'd but not populated. AFAIK you can't apply the __block keyword to primitive ints of NSObject pointers so a thread-safe (and lock-free) NSMutableArray replacement would have to be found to get true parallel mapping... Still, using a normal dispatch queue speeds things up a good bit.