Click or drag to resize

BlockingTryEnter Method (Object, TimeSpan, Boolean)

Oracle® Fusion Middleware .NET API Reference for Oracle Coherence
14c (14.1.1.0)
F23534-02
Attempts, for the specified number of milliseconds, to acquire an exclusive lock on the specified object, while still respecting the calling thread's ThreadTimeout, and atomically sets a value that indicates whether the lock was taken.

Namespace:  Tangosol.Util
Assembly:  Coherence (in Coherence.dll) Version: 14.1.1.14 (14.1.1.14)
Syntax
C#
public static void TryEnter(
	Object obj,
	TimeSpan span,
	ref bool lockTaken
)

Parameters

obj
Type: SystemObject
The object on which to acquire the lock.
span
Type: SystemTimeSpan
The maximum time to wait for the lock.
lockTaken
Type: SystemBoolean
The result of the attempt to acquire the lock, passed by reference. The input must be false. The output is true if the lock is acquired; otherwise, the output is false. The output is set even if an exception occurs during the attempt to acquire the lock.
Exceptions
ExceptionCondition
ThreadInterruptedException If the thread is interrupted.
See Also