Re: User-space threads and NSAutoreleasePool
Re: User-space threads and NSAutoreleasePool
- Subject: Re: User-space threads and NSAutoreleasePool
- From: Jens Alfke <email@hidden>
- Date: Thu, 18 Mar 2010 10:05:43 -0700
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 (email@hidden)
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:
This email sent to email@hidden