Skip to content

Pylon::CLock#

A simple recursive lock class. More…

#include <pylon/TypeMappings.h>

Public Functions#

Name
CLock()
Constructs a lock object. The lock is not initially locked.
bool TryLock()
Tries to acquire the lock. If the lock currently locked by another thread the function returns immediately and returns false.
void Lock()
Acquires the lock. If the lock is currently held by another thread the function waits until the other thread releases the lock.
void Unlock()
Releases the lock.

Detailed Description#

class Pylon::CLock;

A simple recursive lock class.

See: AutoLock

Public Functions Documentation#

function CLock#

CLock()

Constructs a lock object. The lock is not initially locked.

function TryLock#

bool TryLock()

Tries to acquire the lock. If the lock currently locked by another thread the function returns immediately and returns false.

function Lock#

void Lock()

Acquires the lock. If the lock is currently held by another thread the function waits until the other thread releases the lock.

function Unlock#

void Unlock()

Releases the lock.