This example program contains two files, multthrd.c and thrdfunc.c, which demonstrate a multithreaded Client-Library application.
The example program comprises two files:
multthrd.c – contains the source code that spawns five threads. Each thread processes a cursor or a regular query. The main thread waits for the other threads to complete query processing and then terminates.
thrdfunc.c – contains platform-specific information that determines which thread and synchronization routines the example uses for execution.
For more information about this example program, see the leading comments in the example source files.
This example cannot run if your platform does not have
a thread package supported by Client-Library. In addition, it requires
SQL Server version 11.1 or later, or Adaptive Server.