public bool TryEnterWriteLock(
int millisecondsTimeout
)
Public Function TryEnterWriteLock (
millisecondsTimeout As Integer
) As Boolean
public:
bool TryEnterWriteLock(
int millisecondsTimeout
)
function TryEnterWriteLock(millisecondsTimeout);
Upon successful acquisition of a write lock, use the finally block of a try/finally statement to call ExitWriteLock. One ExitWriteLock should be called for each EnterWriteLock or TryEnterWriteLock(Int32).
Note that this function may wait as long as 2 * millisecondsTimeout since the function first waits for synchronous access to the semaphore, then waits again on an available semaphore slot.