• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSPorts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPorts


  • Subject: Re: NSPorts
  • From: Nathan Day <email@hidden>
  • Date: Tue, 28 Jan 2003 22:47:09 +1030

Look at the NDRunLoopMessenger project on my web site, it does exactly what you are after, though you could probable do everything you want without the use of ports or even locks. You can pass the initial string with the thread creation method, the boolean flags are set atomically so you don't need to do anything specially to handle them unless you thread has to wait for them to wait on them or something, and when NSThread is about to end a NSThreadWillExitNotification notification is sent so you can use this to know when the result is ready. There is also a method defined in NSObject that does a simplified version of my NDRunLoopMessenger, 'performInMainRunloop' or something like that.

On Tuesday, January 28, 2003, at 06:44 AM, Jason Reece wrote:

I have a numerically intensive process that I wish to run as a separate thread from my UI. I want to pass it a string argument at the beginning, a few control booleans as its going along, and it needs to tell me when its done, and send me the data in the form of an NSArray.

having looked at the documentation, it would appear that I need to use NSPorts. I've tried the solutions given, but I cannot get them to function at all. Also, I cannot find a definition for 'protocol' anywhere.

Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSPorts (From: Jason Reece <email@hidden>)

  • Prev by Date: PeopleSoft Development Possibility
  • Next by Date: Re: NSView doesnt receive mouseMoved events?
  • Previous by thread: NSPorts
  • Next by thread: NSDrawer delegate function mis-described?
  • Index(es):
    • Date
    • Thread