synchronising tools do not do what you want?

________________________________
De: fpc-pascal-boun...@lists.freepascal.org 
<fpc-pascal-boun...@lists.freepascal.org> em nome de Xiangrong Fang 
<xrf...@gmail.com>
Enviado: quarta-feira, 25 de fevereiro de 2015 12:33
Para: FPC-Pascal users discussions
Assunto: Re: [fpc-pascal] Use sleep in thread

2015-02-25 23:16 GMT+08:00 <hinsta...@yandex.ru<mailto:hinsta...@yandex.ru>>:
not sure if this helps, but:
for example, if you want thread T to run using approx. 70% of max. available 
capacity, try this:

repeat
  T.Resume;
  Sleep(70);
  T.Resume;
  Sleep(30);
until ...

?This seems not what I want. I would like to schedule it from within the 
thread.  My demo program is here:

https://github.com/xrfang/fpcollection/blob/master/src/demos/asyncdo/demo.lpr

TAsyncDo is the class I wrote to have a procedure run in parallel.

I want to control priority of the thread from within the worker, not from the 
main thread. ?

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to