Generate thread-safe code

You can use the -thread option to instruct the preprocessor to generate thread-safe code.

You must use the THREADLIB environment variable with this option to specify which thread package to use when you compile your application.

For Windows™ environments, the HCL OneDB™ general libraries (libgen, libos, libgls, libafs, and libsql) are shared, thread-safe DLLs. Therefore, the esql command links the shared, thread-safe DLLs automatically. You do not set the THREADLIB environment variable when you compile multithreaded applications in a Windows environment.