-
Re: Is XPC reply guaranteed to be dispatched in a sole single thread?
eskimo Dec 26, 2016 1:34 PM (in response to imneo)You’re asking about threads when you should be asking about queues. NSXPCConnection replies are always delivered on a specific serial queue internal to the connection. There’s a comment in
<Foundation/NSXPCConnection.h>
that says as much:Each NSXPCConnection instance has a private serial queue. This queue is used when sending messages to reply handlers, interruption handlers, and invalidation handlers.
Which thread runs blocks posted to that queue is not specified.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardwarelet myEmail = "eskimo" + "1" + "@apple.com"
-
Re: Is XPC reply guaranteed to be dispatched in a sole single thread?
imneo Dec 27, 2016 6:42 AM (in response to eskimo)Ah. That's exactly what I want. I only want to know if the reply handlers are called in serial mode so that I can determine some locks/synchronization could be omitted in my code.
-