Re: NSMessagePort Invalidation
Re: NSMessagePort Invalidation
- Subject: Re: NSMessagePort Invalidation
- From: Jean-Daniel Dupas <email@hidden>
- Date: Thu, 17 Jul 2008 17:10:11 +0200
Le 17 juil. 08 à 16:48, Keary Suska a écrit :
7/15/08 8:48 AM, also sprach email@hidden:
NSMessagePort doesn't seem to post the
NSPortDidBecomeInvalidNotification notification when the remote port
dies. It doesn't seem to matter if the remote port is closed via the
invalidate method or by killing the process. The only way I am seeing
the notification posted is when I send invalidate to the port
locally.
This seems contrary to the documentation:
"Posted from the invalidate method, which is invoked when the NSPort
is deallocated or when it notices that its communication channel has
been damaged."
Is this a legit bug or have I missed something?
Mach port ares unidirectional, one to many channels. You create on
"receive port", and then you can create as many "send ports" attached
to this port.
If a "send port" die, this does not close the channel, and does not
affect the "receive port" in fact, as it is always valid and it's
possible to create some new "send ports" from it.
I don't now exactly how it works with NSMachPort, but that's own low
level mach port works and that's maybe why you do not receive your
notification.
_______________________________________________
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