[fpc-devel]promised tthread patch

Johannes Berg johannes at sipsolutions.com
Fri Nov 14 22:10:09 CET 2003


On Fri, 2003-11-14 at 21:34, KJK::Hyperion wrote:
> I don't agree with the notes about Suspend/Resume. Suspending a thread on
> POSIX is possible, as long as you define what "suspending" means. Assuming
> a "suspended" thread is a thread that doesn't execute application code,
> forcing the target thread to wait on a mutex would be enough, IMHO (on a
> side note, this is how some third party extensions for Windows implement
> SIGSTOP semantics). Don't be too quick about dismissing "suspending" as
> "non-portable": condition variables and thread canceling were thought as
> *impossible* to implement on Win32, before RedHat successfully implemented
> the POSIX threads interface on Win32

Ok, let me rephrase.
Suspending at any arbitrary point as the semantics of .suspend() are, is
afaik impossible (and besides -- not a good idea either).

I do plan on adding an implementation for the thread calling .suspend on
itself though (could be implemented via the same pipe I already have in
there again).

johannes
-- 
http://www.sipsolutions.de/
GnuPG key: http://www.sipsolutions.de/keys/JohannesBerg.asc
  Key-ID: 9AB78CA5 Johannes Berg <johannes at sipsolutions.de>
  Fingerprint = AD02 0176 4E29 C137 1DF6 08D2 FC44 CF86 9AB7 8CA5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20031114/2176a669/attachment.sig>


More information about the fpc-devel mailing list