Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Sets the state of the event to signaled, which allows at most one waiting thread to proceed.
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public Function Set As Boolean
public bool Set()
public:
bool Set()
member Set : unit -> bool
public function Set() : boolean
Return Value
Type: System. . :: . .Boolean
true if the operation succeeds; otherwise, false.
Remarks
The Set method releases a single thread. If there are no waiting threads, the wait handle remains signaled until a thread attempts to wait on it, or until its Reset method is called.
Important
There is no guarantee that every call to the Set method will release a thread. If two calls are too close together, so that the second call occurs before a thread has been released, only one thread is released — as if the second call did not happen. Also, if the Set method is called when there are no threads waiting and the AutoResetEvent is already signaled, the call has no effect.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.