Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Oct : tcritical section

www.cryer.info
Managed Newsgroup Archive

tcritical section

Subject:tcritical section
Posted by:"Matthew Augier (dps)" (matth..@dps.uk.com)
Date:Tue, 16 Oct 2007 21:32:02

I've some issue with tCriticalSections in Delphi (7). I've got a number
threads running 1..x and they all need to access a section of code to do
some work (single instance). The way I've set it up is that there is a
single tCriticalSection (Created in a form) and each thread calls a peice of
custom code which reserves (criticalsection.Acquire) then does what it
needs, afer that release is (criticalsection.release). This code is run as
as part of the thread, not syncronised at all...

However in my application (and test application) the criticalsection.reserve
seems to do nothing and the code just runs anyway.

What am I missing?

TIA

Mat

Replies:

www.cryer.info
Managed Newsgroup Archive