In the preemptive scheduling mode, all threads are executable at the same time. Thread scheduling is handled by the Windows. Preemptive scheduling prevents a single thread from monopolizing the server. When running your application in the preemptive mode, your application can use the debugger’s thread facility to manipulate threads. It can also perform blocking operations without bringing the server to a halt. Preemptive mode can offer better performance for applications that do not share much data between threads
To guarantee portability to platforms where only co-routine
scheduling is available, always protect global data using Server-Library’s mutex facility rather
than using the Windows-specific semaphore APIs.
This section offers information about Windows-specific preemptive programming using the srv_sleep and srv_wakeup calls.