Can Borland C++ for OS/2 give up a TimeSlice?
Johan> Does anyone know if Borland C++ for OS/2 has a function that could be Johan> used within a THREAD to give up a TimeSlice. A: If all you want to do is give up your timeslice DosSleep(0) however if you are the highest priority thread, you will be immediately dispatched again, before other threads. Even when all the threads are the same priority, my understanding is that the OS/2 operating system has a degradation algorithm for the threads in a process … so even if you DosSleep with the “same” priority your thread still could be dispatched immediately — depending on the degradation algorithm. If you want to sleep to next clock tick DosSleep(1) works, because the system round the 1 up to the next clock tick value. This should allow other threads in your process to be dispatched. Both are valid semantics, depending on what you would prefer. — William E. Hannon Jr. internet:whannon@austin.ibm.