• 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
NSMachPort to raw mach port
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMachPort to raw mach port


  • Subject: NSMachPort to raw mach port
  • From: Thomas Hudson <email@hidden>
  • Date: Mon, 1 Apr 2002 09:19:25 -0600

I'm trying to pass data from a high priority thread back to my main run loop.
I don't know if this approach is valid, but I wanted to use an NSMachPort in
the main thread to receive the data, and in the high priority thread use a
raw mach port to send the data. I want to avoid the overhead of allocating
memory and autorelease pools in the high priority thread.

As I understand it, an NSPort is abstract and actually returns an NSMachPort,
is this correct? Could I create an NSPort and cast to an NSMachPort in order
to get the machPort number?

Otherwise, how are mach port names allocated? How do I determine
what integer value to use for initWithMachPort: (int) machPort

Can any point me to code or docs that do something similar, or suggest
an alternate approach?
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSMachPort to raw mach port
      • From: Finlay Dobbie <email@hidden>
  • Prev by Date: Re: collapsible item and table info
  • Next by Date: Re: Carbon Events vs Cocoa Events
  • Previous by thread: Re: Full screen Mode
  • Next by thread: Re: NSMachPort to raw mach port
  • Index(es):
    • Date
    • Thread