Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMachPort vs. NSMessagePort



If you're going to use one, use NSMachPort. There is no advantage to NSMessagePort.

I would not use Distributed Objects for inter-thread communication myself. The same amount of hassle as setting up something else (just different hassle), and additional overhead to slow things down.


Chris Kane Cocoa Frameworks, Apple


On May 30, 2007, at 6:42 PM, Gerriet M. Denkmann wrote:

What is the difference between these two?
In which situations should I prefer one over the other?

The context: a NSDocument based Cocoa app with main thread and a background working thread for each document, which sit around using a NSRunLoop waiting for requests.

All worker threads access a common MyDataStore object rather often (up to 100 000 times per computation) so using NSConnection (Distributed Objects) seems not such a good idea.

OS X 10.4.9

Gerriet.

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSMachPort vs. NSMessagePort (From: "Gerriet M. Denkmann" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.