Acquires the lock if it is not held by another strand and returns immediately, setting the lock hold count to one.
If the current strand already holds the lock then the hold count is incremented by one and the method returns immediately.
If the lock is held by another strand then the current strand becomes disabled for strand scheduling purposes and lies dormant until the lock has been acquired, at which time the lock hold count is set to one.
|
|
|
|