On Mar 18, 2010, at 8:35 AM, Michael Ash wrote:
Cocoa keeps around a lot of thread-specific state. In addition to autorelease pools, you also have exception handlers, graphics contexts, and possibly others.
Yup. I quickly ran into this in 2008 when experimenting with implementing coroutines (which use the same ucontext stuff.) Lightweight threads/coroutines can be very useful for highly scalable systems — that's one reason there's a lot of hype about Erlang these days — but you can't graft them on top of a runtime that doesn't know about them and already has its own threading support.
I haven't had a chance yet to use the Grand Central / dispatch-queue stuff in 10.6, but I believe that it offers some similar functionality, like being able to create huge numbers of concurrent operations without having each one create a kernel thread.
—Jens_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com