NSMachPort to raw mach port
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.