public bool TryEnterReadLock(
int millisecondsTimeout
)
Public Function TryEnterReadLock (
millisecondsTimeout As Integer
) As Boolean
public:
bool TryEnterReadLock(
int millisecondsTimeout
)
function TryEnterReadLock(millisecondsTimeout);
Upon successful acquisition of a read lock, use the finally block of a try/finally statement to call ExitReadLock. One ExitReadLock should be called for each EnterReadLock or TryEnterReadLock(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.