On Fri, 15 Oct 2010 18:26:59 +0200, Andrew Brunner
<andrew.t.brun...@gmail.com> wrote:

Externally suspending a thread *IS* absolutely unsafe.

At least we're on the same page here. :)

But the notion of suspending an ENGINE at runtime externally is
totally expected.
The thread itself MUST put itself in a suspended state.

Yes. This could be done. Yet, there's no way of knowing if the
thread is actually suspended without some sort of answer from
the to be suspended thread, means you'd need synchronisation again.

A possible solution would be to lower the to be suspended thread's
priority below that of the Idle-Task. Yet, there are very few
systems that provide such kind of asynchronous thread control and
AFAIK none of them is an FPC target.

(Sorry, Andrew. Freaking different mail program. I'm sooo used to
press "R" for Reply To Mailinglist...)


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

Reply via email to