xtd 0.2.0
Loading...
Searching...
No Matches
condition_variable.h
Go to the documentation of this file.
1
4#pragma once
6#if !defined(__XTD_CORE_NATIVE_LIBRARY__)
7#error "Do not include this file: Internal use only"
8#endif
10
11#include <xtd/core_native_export>
12#include <cstddef>
13#include <cstdint>
14#include <string>
15
17namespace xtd {
19 namespace threading {
20 class monitor;
21 }
23
26 namespace native {
35 class core_native_export_ condition_variable final {
36 condition_variable() = delete;
38 protected:
40
45 static intmax_t create();
46
50 static void destroy(intmax_t handle);
51
55 static void pulse(intmax_t handle);
56
60 static void pulse_all(intmax_t handle);
61
68 static bool wait(intmax_t handle, intmax_t critical_section_handle, int32_t milliseconds_timeout);
70 };
71 }
72}
Contains condition_variable native API.
Definition condition_variable.h:35
static void pulse_all(intmax_t handle)
Pulse all waiting condition variable with specified condition variable handle.
static intmax_t create()
Create condition variable.
static void destroy(intmax_t handle)
Destroy condition variable with specified condition variable handle.
static bool wait(intmax_t handle, intmax_t critical_section_handle, int32_t milliseconds_timeout)
Wait`condition variable with specified condition variable handle.
static void pulse(intmax_t handle)
Pulse wainting condition variable with specified condition variable handle.
Provides a mechanism that synchronizes access to objects.
Definition monitor.h:130
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10