Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

ID: 13558, Critical section management

by Alex Bakaev Email: Anonymous

Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For C++Builder, Version 1.0  to 4.0 1385 downloads
Copyright: No significant restrictions

Size: 457 bytes
Updated on Tue, 27 Jul 1999 00:00:00 GMT
Originally uploaded on Tue, 27 Jul 1999 00:00:00 GMT
SHA1 Hash: 96DDC53AE54E8552D7D9536B0291E63A8E70F16E
MD5 Hash: 2F4B22F75A9422291E9B251D9379C477

    Explore the files in this upload

This simple class automates entering/leaving critical section to provide thread syncronization. A valid critical section must be initialized ( in WinMain or DllEntryPoint ); various solutions may exist as to where this critical section lives ( a global, in a form object, .etc. ). Usage is lice this:

{ // beginning of a block
AutoCritSec critSec( SomeCritSection );
...some code
}// end of a block.

I find this is easier and less bug prone than calling Lock/Unlock methods.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03