|
Ross,
I think that if you are trying to prevent
re-entrancy, you are s**t out of luck.
A critical section will stop access to the
same bit of code by 2 separate threads, but if you're just using the main VCL
thread, then the CriticalSection will let you in 'coz its in the same thread
context.
You need to use some other kind of
semaphore. A boolean const is a good candidate (as long as you have
writeable consts on).
----- Original Message -----
Sent: Thursday, May 27, 2004 7:28
PM
Subject: [DUG] Critical Sections
I've never used a TCriticalSection before and the
help doesn't help much. I was wondering if a CriticalSection can be used
in the situation of using Application.ProcessMessages and a
TTimer. I know it's usually used with separate threads. I'm
cheating a bit trying to get away from using threads. I basically don't
want the same procedure to be executed while it is currently being
executed. I can do it another way if necessary but just
wondering.
Cheers, Ross
Levis.
_______________________________________________ Delphi mailing
list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
|
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi