blob: 3b5d71e63bee8e13397d653d969ccf343929eabc (
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
|
//
// System.Threading.AutoResetEvent.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 AutoResetEvent : WaitHandle
{
// Constructor
public AutoResetEvent(bool initialState) {
os_handle = NativeEventCalls.CreateEvent_internal(false,initialState,null);
}
// Methods
public bool Set() {
return(NativeEventCalls.SetEvent_internal(os_handle));
}
public bool Reset() {
return(NativeEventCalls.ResetEvent_internal(os_handle));
}
}
}
|