Class MutexLock
[MustDisposeResource]
public sealed class MutexLock
- Inheritance
-
MutexLock
- Extension Methods
Examples
Instead of lock (_object) { code(); }
for per-process locking use
using (new MutexLock("name") { code(); }
for inter-process locking.
Remarks
Automatically handles AbandonedMutexException with Warn(string, Exception?).
Constructors
MutexLock(string)
Acquires Mutex with name
.
public MutexLock(string name)
Parameters
name
string
Methods
Dispose()
Releases the Mutex.
public void Dispose()