xtd 0.2.0
Loading...
Searching...
No Matches
xtd::native::critical_section Class Referencefinal

Definition

Contains critical_section native API.

Namespace
xtd::native
Library
xtd.core.native
Remarks
xtd::threading::semaphore does not use xtd::native::critical_section API as it uses std::recursive_timed_mutex class.
Warning
Internal use only

Protected Static Methods

static intmax_t create ()
 Create critical section.
 
static void destroy (intmax_t handle)
 Destroy critical section with specified critical section handle.
 
static void enter (intmax_t handle)
 Wait critical section with specified critical section handle.
 
static bool try_enter (intmax_t handle)
 Attempts to enter critical section with specified critical section handle.
 
static void leave (intmax_t handle)
 Release`critical section with specified critical section handle.
 

Member Function Documentation

◆ create()

static intmax_t xtd::native::critical_section::create ( )
staticprotected

Create critical section.

Returns
The handle of the created critical section.
Warning
Internal use only

◆ destroy()

static void xtd::native::critical_section::destroy ( intmax_t  handle)
staticprotected

Destroy critical section with specified critical section handle.

Parameters
handleThe critical section handle to destroy.
Warning
Internal use only

◆ enter()

static void xtd::native::critical_section::enter ( intmax_t  handle)
staticprotected

Wait critical section with specified critical section handle.

Parameters
handleThe critical section handle to wait.
Returns
true if succeed; otherwhise false.

◆ try_enter()

static bool xtd::native::critical_section::try_enter ( intmax_t  handle)
staticprotected

Attempts to enter critical section with specified critical section handle.

Parameters
handleThe critical section handle to wait.
Returns
true if succeed; otherwhise false.

◆ leave()

static void xtd::native::critical_section::leave ( intmax_t  handle)
staticprotected

Release`critical section with specified critical section handle.

Parameters
handleThe critical section handle to release.
Warning
Internal use only

The documentation for this class was generated from the following file: