[fpc-pascal] Use sleep in thread
skalogryz.lists at gmail.com
Wed Feb 25 15:47:29 CET 2015
I presume most of the systems would make the sleeping thread to yield the
execution time for other threads.
The questionable behavior might occur in case of sleep(0); (should it
yield the remaining time or just return immediately - up to the OS).
And multi-cpu might also do something different.
On Wed, Feb 25, 2015 at 9:41 AM, Xiangrong Fang <xrfang at gmail.com> wrote:
> Hi All,
> Can I use Sleep() in a thread to give up cpu time to other threads running
> at the same time, so as to adjust the relative "niceness" of a group of
> workers working on the same subject (in which each thread take part of the
> whole task).
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal