BlockingTryEnter Method (Object, Int32, Boolean) |
Oracle® Fusion Middleware .NET API Reference for Oracle Coherence
14c (14.1.1.0)
F23534-02
Attempts, for the specified amount of time, 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)
Syntaxpublic static void TryEnter(
Object obj,
int millis,
ref bool lockTaken
)
Parameters
- obj
- Type: SystemObject
The object on which to acquire the lock. - millis
- Type: SystemInt32
The maximum number of milliseconds 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
See Also