Initializes a new instance of the
ManualResetEventSlim
class with a Boolen value indicating whether to set the intial state to signaled and a specified
spin count.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _
initialState As Boolean, _
spinCount As Integer _
) |
C# |
---|
public ManualResetEventSlim(
bool initialState,
int spinCount
) |
Parameters
- initialState
- Type: System..::.Boolean
true to set the initial state to signaled; false to set the initial state
to nonsignaled.
- spinCount
- Type: System..::.Int32
The number of spin waits that will occur before falling back to a true
wait.
Exceptions
Exception | Condition |
---|
System..::.ArgumentOutOfRangeException | spinCount is less than
0 or greater than the maximum allowed value. |
See Also