Marco van de Voort wrote:
In our previous episode, Xiangrong Fang said:
BUT, that cannot be used to prioritize a thread. While you block a thread
using rtlevent, it can only be unblocked from another thread. While you use
sleep(), it still get time share of the CPU, only that it does nothing
until sleep finishes, right?
No, basically a sleeping thread is marked in the scheduler as "do not schedule
for nn
ticks". The thread doesn't run to evaluate if it should contiue. That is the
scheduler/kernel's task.
Looking at the TThread documentation, since Suspend and Resume are
deprecated should Suspended be similarly annotated?
Looking at
http://wiki.lazarus.freepascal.org/Multithreaded_Application_Tutorial#Initialization_and_Finalization
there are dire warnings that TThread.Create() shouldn't be overridden.
Should this be in the documentation if it's a significant issue?
Sorry about the niggles, I'm currently trying to track down a race
condition.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal