Thread Safety#
Most SDK functions are thread safe, with the following important exceptions:
SDK Initialization and Shutdown: Functions that initialize or shut down the SDK are not thread safe. These should only be called from a single thread, and no other SDK functions should be called concurrently during initialization or shutdown.
Handle-Mutating Functions: Functions that create, destroy, or modify handles (such as setters, create, or free functions) are not thread safe with respect to the same handle. Do not call these functions concurrently on the same handle from multiple threads.
Handle Usage in Multithreaded Environments#
Handles (the first argument to most SDK functions) may be safely shared between threads as long as only thread-safe functions are called, and no thread is concurrently mutating the handle (creating, destroying, or modifying it).
If a function or handle has different thread safety guarantees, this will be explicitly documented in the API reference.