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.
thanks, Dmitry On Wed, Feb 25, 2015 at 9:41 AM, Xiangrong Fang <xrf...@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). > > Thanks! > > Xiangrong > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal >
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal