SwitchSwitchOff Method |
Name | Description | |
---|---|---|
SwitchOff |
Switches the switch off (if on). Uses locking.
| |
SwitchOff(Action) |
Executes the provided action if the lock is on. This is done under a lock so be _very_ careful with longrunning/blocking operations in it.
Only executes the action if the switch is on, and switches it off immediately after obtaining the lock.
Will switch it back on if the provided action throws an exception.
|