Re: Task dispatching
Re: Task dispatching
- Subject: Re: Task dispatching
- From: "Stephen J. Butler" <email@hidden>
- Date: Tue, 13 Sep 2011 14:50:35 -0500
On Tue, Sep 13, 2011 at 1:36 PM, Scott Ribe <email@hidden> wrote:
> On Sep 13, 2011, at 12:23 PM, Jens Alfke wrote:
>> The forked process is an exact clone of the original, with its address space copy-on-write, so it’s already up and running without any startup time.
>
> Yeah, but about the only thing you can do in that forked process is exec a new image over it. This is not a technique for memory sharing.
Assuming you stay away from Frameworks that forbid forking (Cocoa,
mach ports, etc) the only remaining issue I'm aware of is threading.
That is because IIRC threads other than the forking one don't survive:
they are immediately killed in the child. If they happened to be
holding any locks, say in malloc, then you'll deadlock easily.
But if you also aren't using threading then you'll be OK. Really,
threading and forking are two different paradigms and you shouldn't be
mixing them anyway.
Programs like postgres run just fine in OS X and they rely heavily on forking.
_______________________________________________
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