Share via


Semaphore Class

Represents a synchronization object that controls a shared resource that can support a limited number of users.

class Semaphore : public HandleT<HandleTraits::SemaphoreTraits>

Members

Public Typedefs

Name

Description

SyncLock

A synonym for a class that supports synchronous locks.

Public Constructors

Name

Description

Semaphore::Semaphore Constructor

Initializes a new instance of the Semaphore class.

Public Methods

Name

Description

InvokeHelper::Invoke Method

Calls the event handler whose signature contains the specified number of arguments.

Public Data Members

Name

Description

Semaphore::Lock Method

Waits until the current object, or the object associated with the specified handle, is in the signaled state or the specified time-out interval has elapsed.

Public Operators

Name

Description

Semaphore::operator= Operator

Moves the specified handle from a Semaphore object to the current Semaphore object.

Inheritance Hierarchy

Semaphore

Requirements

Header: corewrappers.h

Namespace: Microsoft::WRL::Wrappers

See Also

Reference

Microsoft::WRL::Wrappers Namespace