Thread safety of AXUIElement.h functions

Does anyone know whether the functions defined in AXUIElement.h are thread safe or reentrant?


I've been working with them for years, and I still haven't been able to figure out in what contexts it's safe to call these functions. In the past I've had issues with calling them from threads other than an application's main thread, so to play it safe I try to keep my Accessibility functionality constrained to my app's main thread.


But sometimes the functions are slow and block the app's user interface, so it's becoming increasingly untenable for me not to use them in a separate thread.


The documentation and header file give no indication whatsoever.


Any help with this would be much appreciated!

Accepted Reply

I just exchanged emails with Apple developer technical support and was told that all Accessibility functions are only safe to call from an application's main thread.

Replies

I just exchanged emails with Apple developer technical support and was told that all Accessibility functions are only safe to call from an application's main thread.