Skip to content

Instantly share code, notes, and snippets.

@caughtinflux
Created January 13, 2013 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caughtinflux/4522600 to your computer and use it in GitHub Desktop.
Save caughtinflux/4522600 to your computer and use it in GitHub Desktop.
CFMessagePort
_localMessagePort = CFMessagePortCreateLocal(kCFAllocatorDefault, CFSTR(kLocalMessagePortName), callbackHandler, NULL, false);
CFMessagePortSetDispatchQueue(_localMessagePort, _callbackQueue);
CFRunLoopSourceRef localRunLoopSource = CFMessagePortCreateRunLoopSource(kCFAllocatorDefault, _localMessagePort, 0); // this function is returning NULL
CFRunLoopAddSource(CFRunLoopGetCurrent(), localRunLoopSource, kCFRunLoopCommonModes);
CFRelease(localRunLoopSource);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment