blob: a3a3be44112bf3e5f49f753b2c3d50a1b081e6bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
//
// System.Threading.ManualResetEvent.cs
//
// Author:
// Dick Porter (dick@ximian.com)
// Veronica De Santis (veron78@interfree.it)
//
// (C) Ximian, Inc. http://www.ximian.com
//
using System;
using System.Runtime.CompilerServices;
namespace System.Threading
{
public sealed class ManualResetEvent : WaitHandle
{
// Constructor
public ManualResetEvent (bool initialState)
{
os_handle = NativeEventCalls.CreateEvent_internal (true, initialState, null);
}
// Methods
public bool Set()
{
return (NativeEventCalls.SetEvent_internal (os_handle));
}
public bool Reset()
{
return(NativeEventCalls.ResetEvent_internal (os_handle));
}
}
}
|