This should be `if callable(...):`. And it should document the fact that it is calls the function in a thread (or maybe be run in the main thread).

I'm not sure what the use case is, so I don't know if this will likely call into the synchronous client library.