KRASCHE
&
BYRNE
         ELZED  HOME       NEWS       DOCS       DOWNLOADS       LICENSING       SUPPORT       FAQ       ABOUT  US

What's An Elzed?
Features
Licensing
Downloads
Documentation
Elzed News
    ELZED 
 Documentation 
 The Details 
 API 

lzLockContext

The lzLockContext function reserves the current context for exclusive use by the current thread.

bool lzLockContext(
   void
);

Parameters

   

None.


Return Value

   Returns TRUE if the current context is locked, FALSE otherwise.

Remarks

   This function gives you an added measure of control when sharing contexts between threads. A locked context is available only to the thread that issued the lock. A context may be locked by only one thread at a time. Threads that attempt to lock a previously locked context will block until the lock is released.

Note, however, that for this mechanism to work, your threads must call lzLockContext before using a context. Elzed will not do this for you.

While both public and private contexts may be locked, lzLockContext is only effective on public contexts. Since private contexts are available only to the threads that created them, they are, in a sense, already locked.

The primary context may not be locked.

Use lzReleaseContext to remove a lock.

Versions

   Introduced in Elzed 2.2.0
   This page describes the version of lzLockContext active in Elzed 2.5.0 (140: 2.5.0)

See Also



  Copyright  ©  MMXXV  by  R R Le Cropane   •   All Rights Reserved   •   Terms of Use   •   Privacy Policy