Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can Borland C++ for OS/2 give up a TimeSlice?

borland OS timeslice
0
Posted

Can Borland C++ for OS/2 give up a TimeSlice?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.