Correct - From memory.
Myles.
-----Original Message-----
From: Allan, Samuel [mailto:[EMAIL PROTECTED]
Sent: Thursday, 12 February 2004 16:51
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] TCriticalSection
Quick question, I think I'm right, but I just want confirmation:
If a thread calls Aquire a second time on the same TCriticalSection,
then the thread does not block right?
The thread does not release the TCriticalSection until all calls to
Aquire have been matched by a call to Release?
I have a recursive method that needs to be locked away behind a
TCriticalSection. Like I can rewrite so there's no problem, but this is
easier.
procedure RecursiveMethod;
begin
criticalSection.Aquire;
try
...
RecursiveMethod;
...
finally
critcalSection.Release;
end;
end;
_______________________________________________
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