IPrimalLock is available for use at all times, including DLL initialization and static/global constructor time.
DO NOT ever create a global or static IPrimalLock object, because that will permanently lock the primal lock and your application will likely hang forever. It is only for use on the stack, to create scope based locking during initialization.
Also DO NOT use IPrimalLock as a general purpose thread synchronization mechanism. Use IPrimalLock to allocate an IPrivateResource or ISharedResource object in a thread safe way and use that resource object to do your thread synchronization. Otherwise, IPrimalLock would become a choke point causing unwarranted blocking of otherwise unrelated threads.
Constructors & DestructorThe constructors and destructor for this class.
![]() |
public:
~IPrimalLock()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IPrimalLock()
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |