detachCurrentThread()
If the user calls a program utilizing API functions from different threads, use detachCurrentThread() to properly clean up the thread environment. This method requires no parameters.
Note
This method must be called after all other APIs if a calling program does not run from a main thread.
Syntax
void DetachCurrentThread()
Exception
Passes an exception in a case of internal error.
Example
DetachCurrentThread();
The method properly cleans up the environment for a current thread.
Note
All the threads should be detached using detachCurrentThread() before calling closeService(), else the application may give an unexpected behavior.