Implemented fast version of ThreadLocal<T>.
[mono.git] / mcs / class / corlib / System.Threading / AutoResetEvent.cs
old mode 100755 (executable)
new mode 100644 (file)
index 48eebe0..c6f3e2b
@@ -9,7 +9,7 @@
 //
 
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004, 2005 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 
 using System;
 using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
 
 namespace System.Threading 
 {
-
-       public sealed class AutoResetEvent : WaitHandle 
+       [ComVisible (true)]
+       public sealed class AutoResetEvent : EventWaitHandle
        {
                // Constructor
-               public AutoResetEvent(bool initialState) {
-                       Handle = NativeEventCalls.CreateEvent_internal(false,initialState,null);
-               }
-
-               // Methods
-
-               public bool Set() {
-                       CheckDisposed ();
-                       
-                       return(NativeEventCalls.SetEvent_internal(Handle));
+               public AutoResetEvent (bool initialState)
+                       : base(initialState, EventResetMode.AutoReset)
+               {
                }
-
-               public bool Reset() {
-                       CheckDisposed ();
-                       
-                       return(NativeEventCalls.ResetEvent_internal(Handle));
-               }
-
        }
 }