---
name: "sc_ThreadLock"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_ThreadLock"
---

# sc\_ThreadLock(3)

The ThreadLock abstract class provides mutex locks to be used in conjunction with ThreadGrp's.

## NAME

sc::ThreadLock - The **ThreadLock** abstract class provides mutex locks to be used in conjunction with **ThreadGrp**'s.

## SYNOPSIS

`#include <thread.h>`

Inherits **sc::RefCount**.

### Public Member Functions

virtual void **lock** ()=0\
 Obtain the lock.  virtual void **unlock** ()=0\
 Release the lock.

### Additional Inherited Members

## Detailed Description

The **ThreadLock** abstract class provides mutex locks to be used in conjunction with **ThreadGrp**'s.

**ThreadLock** objects should be locked and unlocked with **ThreadLockHolder** objects to provide exception safety.

## Author

Generated automatically by Doxygen for MPQC from the source code.
