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.
~CLock()
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#

CLock#

CLock()

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

~CLock#

~CLock()

TryLock#

bool TryLock()

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

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.

Unlock#

void Unlock()

Releases the lock.


Updated on 5 July 2022 at 15:30:00