A safer implementation of C# lock.
Подробнее...
Полный список членов класса
Открытые члены |
| SyncLock () |
| You can create an anonymous lock, but its always nice to give it a name.
|
| SyncLock (string name) |
AquiredLock | Enter (TimeSpan timeout) |
| Attempts to aquire the lock, if we fail within the timeout raise an LockAquireTimeoutException, that way difficult to ignore the fact we failed to get the lock.
|
AquiredLock | Enter (int timeout) |
| Attempts to aquire a lock with in the supplied number of milliseconds.
|
Подробное описание
A safer implementation of C# lock.
Конструктор(ы)
TSLab.Utils.SyncLock.SyncLock |
( |
|
) |
|
You can create an anonymous lock, but its always nice to give it a name.
Методы
AquiredLock TSLab.Utils.SyncLock.Enter |
( |
TimeSpan |
timeout |
) |
|
Attempts to aquire the lock, if we fail within the timeout raise an LockAquireTimeoutException, that way difficult to ignore the fact we failed to get the lock.
- Аргументы:
-
| timeout | Time to wait for the lock |
- Возвращает:
- Returns an object that represents the lock, dispose of it when done with the lock
Attempts to aquire a lock with in the supplied number of milliseconds.
- Аргументы:
-
| timeout | Timeout in Milliseconds |
- Возвращает: