Re: NSMachPort vs. NSMessagePort
Re: NSMachPort vs. NSMessagePort
- Subject: Re: NSMachPort vs. NSMessagePort
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Fri, 1 Jun 2007 12:05:45 +0700
On 31 May 2007, at 10:38, Chris Kane wrote:
If you're going to use one, use NSMachPort. There is no advantage
to NSMessagePort.
[...]
Chris Kane
Cocoa Frameworks, Apple
Thank you very much.
I tried to follow the example "Connecting With NSMachPort" in
"Multithreading Programming Topics" but found some problems:
1. in +(void)LaunchThreadWithPort:(id)inData there is a line
[distantPort release] which I had to remove - otherwise the program
would crash.
2. In - (void)sendCheckinMessage:(NSPort*)outPort I had to add
[messageObj autorelease] at the end - otherwise the program would leak.
3. in - (void)launchThread there is a comment: "Let the worker
release the port" - this does not make sense: the port has never been
allocated or copied, so why should anybody release it?
I tried the link at the bottom of the page (It’s good, but: Report
typos, inaccuracies, and so forth) but Safari informed me that I am
not connected to the internet.
No big surprise: at home I just have no internet connection.
Gerriet.
P.S. My documentation was last updated in November 2006. So my
apologies if this has already been fixed.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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