Endpoint security - In what thread does the client run

I have an app that uses Endpoint security.

I have 1 client that registered many AUTH and NOTIFY event types.

When I I recive an Endpoint Security message (event) and my handler is called. Which thread does it use?

If I have 1 client will it always just use the same 1 thread?

If not, can it ever happen that I register 1 client, and he will handle more then 1 event in the same time? regardless of the event type or any thing else

Your ES client callbacks run on a thread managed by the system. Callbacks for a given client are always serialised, that is, the callback for event N+1 won’t be called until you return from the callback for event N. If you have multiple clients there are no guarantees about the serialisation between the clients.

If I have 1 client will it always just use the same 1 thread?

No. Do not, for example, using thread-local storage to persist state between callbacks.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Endpoint security - In what thread does the client run
 
 
Q