xtd 0.2.0
Loading...
Searching...
No Matches
named_event_wait_handle.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 event_wait_handle;
21 }
23
26 namespace native {
34 class core_native_export_ named_event_wait_handle final {
35 named_event_wait_handle() = delete;
37 protected:
39
47 static intmax_t create(bool initial_state, bool manual_reset, const std::string& name);
48
53 static void destroy(intmax_t handle, const std::string& name);
54
58 static size_t max_name_size();
59
64 static intmax_t open(const std::string& name);
65
70 static bool set(intmax_t handle, bool& io_error);
71
76 static bool reset(intmax_t handle, bool& io_error);
77
88 static uint32_t wait(intmax_t handle, int32_t milliseconds_timeout, bool manual_reset);
90 };
91 }
92}
Contains named_event_wait_handle native API.
Definition named_event_wait_handle.h:34
static bool set(intmax_t handle, bool &io_error)
Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
static size_t max_name_size()
Gets the maximum name size supported.
static intmax_t open(const std::string &name)
Open named event wait handle with specified name.
static intmax_t create(bool initial_state, bool manual_reset, const std::string &name)
Create named event wait handle with specified name, initial count and maxixum count.
static bool reset(intmax_t handle, bool &io_error)
Sets the state of the event to nonsignaled, causing threads to block.
static void destroy(intmax_t handle, const std::string &name)
Destroy named event wait handle with specified event wait handle handle.
static uint32_t wait(intmax_t handle, int32_t milliseconds_timeout, bool manual_reset)
Wait named event wait handle with specified event wait handle handle, timeout and manual reset.
Represents a thread synchronization event.
Definition event_wait_handle.h:37
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10