Thread-safety
The C++ SDK is thread-safe, in the sense that you can call API methods from any thread. In particular you can:
Call
connectToEngine() and
disconnectFromEngine() from different threads
Attach and detach event consumers on different threads
Background threads are created when you call engineInit() and destroyed when engineShutdown() is called. Events received from a correlator will be handled in one of these background threads, so you cannot assume that events will be delivered to you on any particular thread. In the C++ SDK, you must call engineShutdown() before calling exit() or returning from the main function; not doing so may result in a crash.
Note that the API functions are not synchronized, so if you have data that you need to protect from concurrent access, you will need to implement synchronization yourself.
The same applies for the SDK for Java.