DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
EventWaitHandle.h
Go to the documentation of this file.
1
5
6
#pragma once
7
#include "
Common.h
"
8
#include "
System/Threading/WaitHandle.h
"
9
#include "
System/SmartPointer.h
"
10
#include "
System/String.h
"
11
12
namespace
DotNetDupe
{
13
namespace
System
{
14
namespace
Threading
{
21
class
EventWaitHandle
:
public
WaitHandle
{
22
public
:
26
DOTNETDUPE_API
EventWaitHandle
(
bool
initialState,
bool
manualReset);
27
33
DOTNETDUPE_API
EventWaitHandle
(
const
String
& sName,
bool
initialState =
false
,
bool
manualReset =
false
,
bool
openAlways =
true
);
34
40
DOTNETDUPE_API
EventWaitHandle
(
bool
initialState,
bool
manualReset,
const
String
& sName,
bool
openAlways =
true
);
41
48
DOTNETDUPE_API
EventWaitHandle
(
bool
initialState,
bool
manualReset,
const
String
& sName,
bool
openAlways,
bool
& bCreatedNew);
49
51
DOTNETDUPE_API
~EventWaitHandle
()
override
;
52
55
DOTNETDUPE_API
bool
Set
();
56
59
DOTNETDUPE_API
bool
Reset
();
60
63
DOTNETDUPE_API
bool
WaitOne
()
override
;
64
68
DOTNETDUPE_API
bool
WaitOne
(
int
millisecondsTimeout)
override
;
69
74
DOTNETDUPE_API
static
SmartPointer<EventWaitHandle>
OpenExisting
(
const
String
& sName);
75
80
DOTNETDUPE_API
static
bool
TryOpenExisting
(
const
String
& sName,
SmartPointer<EventWaitHandle>
& pResult);
81
82
struct
Impl;
83
protected
:
84
bool
_state
;
85
bool
_manualReset
;
86
String
_name
;
87
void
*
_hHandle
;
88
Impl*
_pImpl
;
89
};
90
}
91
}
92
}
Common.h
Defines common cross-platform macros, export decorators, and fundamental types.
DOTNETDUPE_API
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition
Common.h:20
SmartPointer.h
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
String.h
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
WaitHandle.h
Base abstract classes for synchronization wait handles.
DotNetDupe::System::SmartPointer
A unified smart pointer that supports both unique and shared ownership semantics.
Definition
SmartPointer.h:72
DotNetDupe::System::String
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition
String.h:74
DotNetDupe::System::Threading::EventWaitHandle::_manualReset
bool _manualReset
Definition
EventWaitHandle.h:85
DotNetDupe::System::Threading::EventWaitHandle::_state
bool _state
Definition
EventWaitHandle.h:84
DotNetDupe::System::Threading::EventWaitHandle::Set
bool Set()
Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
Definition
EventWaitHandle.cpp:123
DotNetDupe::System::Threading::EventWaitHandle::OpenExisting
static SmartPointer< EventWaitHandle > OpenExisting(const String &sName)
Opens an existing named system event wait handle.
Definition
EventWaitHandle.cpp:93
DotNetDupe::System::Threading::EventWaitHandle::TryOpenExisting
static bool TryOpenExisting(const String &sName, SmartPointer< EventWaitHandle > &pResult)
Opens an existing named system event wait handle, and returns a value that indicates whether the oper...
Definition
EventWaitHandle.cpp:102
DotNetDupe::System::Threading::EventWaitHandle::_hHandle
void * _hHandle
Definition
EventWaitHandle.h:87
DotNetDupe::System::Threading::EventWaitHandle::WaitOne
bool WaitOne() override
Blocks the current thread until the current WaitHandle receives a signal.
Definition
EventWaitHandle.cpp:173
DotNetDupe::System::Threading::EventWaitHandle::_pImpl
Impl * _pImpl
Definition
EventWaitHandle.h:88
DotNetDupe::System::Threading::EventWaitHandle::_name
String _name
Definition
EventWaitHandle.h:86
DotNetDupe::System::Threading::EventWaitHandle::Reset
bool Reset()
Sets the state of the event to nonsignaled, causing threads to block.
Definition
EventWaitHandle.cpp:141
DotNetDupe::System::Threading::EventWaitHandle::EventWaitHandle
EventWaitHandle(bool initialState, bool manualReset)
Initializes a new instance of the EventWaitHandle class, specifying whether the wait handle is initia...
Definition
EventWaitHandle.cpp:26
DotNetDupe::System::Threading::WaitHandle
Encapsulates operating system-specific objects that wait for exclusive access to shared resources.
Definition
WaitHandle.h:18
DotNetDupe::System::Threading
Definition
AbandonedMutexException.h:11
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
Include
System
Threading
EventWaitHandle.h
Generated by
1.18.0