Blueprint Help Send comments on this topic.
Circuit Scope Locks

Glossary Item Box

Description

Circuit scope locks are portable O/S locks and in practice they are very seldom required.  Unlike CDL's nodal synchronization operators, these objects can only be used at circuit scope (they will not work between separate executable processes).

Typically, circuit locks are used for stateful methods that have reentrancy greater than one, or to avoid data races that can occur if more than one active object shares parent circuit workspace data.  In order to use the locks, they simply need to be instantiated within circuit/active object workspace objects (see Workspace Objects).

Circuit scope locks have type 'ClpCctMtx' and two member functions;

Uns Lock()

This call blocks the executing thread until the lock is acquired.

Uns Unlock()

This call releases a previously acquired lock.  If there are one or more threads that have blocked waiting for the lock, then the first one to have blocked will be unblocked.