The SimbaEngine X SDK typically handles all processing in a single thread, using the same thread as the application uses to make the ODBC or JDBC request. However, multiple threads may be started in the following cases:
In addition, the SimbaEngine X SDK provides support for multithreading that you can use in your custom ODBC or JDBC driver.
Thread class provides the implementation for a thread. There are different options for using this class in your custom driver:
Threadclass and implement the
StartDetachedThread(), passing in a pointer to a function that will be executed when the thread is started.
There is no overall difference in functionality between these methods.
ThreadPool class starts and manages the running threads. It implements the pool of threads, and is responsible for creating new threads and assigning tasks to them.
To implement a multi-threaded environment using the ThreadPool class:
ITaskand implement the
PostTask()method to add runnable tasks to a queue of unprocessed tasks on the
The maximum number of threads is specified by