3
votes
Vote UpVote

Atomic interface initialization

The Delphi Geek – OmniThreadLibrary includes (in the OtlSync unit) a neat record called TOmniCS which wraps IOmniCriticalSection interface (which in itself is just a wrapper around the TCriticalSection) and allows you to use it without an explicit initialization. You just declare a variable of the TOmniCS type in your code and then call Acquire and Release methods of this variable and everything is handled for you. type TOmniCS = record pstrict private ocsSync: IOmniCriticalSection; function GetSyncObj: TSynchroObject; public procedure Initialize; procedure Acquire; inline; ...
Favorite? Off-Topic? gabr @ 2011-11-28 17:47

Statistics

Visits: 909
Votes: 3
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Daniele Teti
knight_killer
vcldeveloper
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)