AbstractQueuedLongSynchronizer.TryAcquire(Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to acquire in exclusive mode.
[Android.Runtime.Register("tryAcquire", "(J)Z", "GetTryAcquire_JHandler")]
protected virtual bool TryAcquire (long arg);
[<Android.Runtime.Register("tryAcquire", "(J)Z", "GetTryAcquire_JHandler")>]
abstract member TryAcquire : int64 -> bool
override this.TryAcquire : int64 -> bool
Parameters
- arg
- Int64
the acquire argument. This value is always the one passed to an acquire method, or is the value saved on entry to a condition wait. The value is otherwise uninterpreted and can represent anything you like.
Returns
true if successful. Upon success, this object has
been acquired.
- Attributes
Exceptions
if acquiring would place this synchronizer in an illegal state. This exception must be thrown in a consistent fashion for synchronization to work correctly.
if exclusive mode is not supported
Remarks
Java documentation for java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryAcquire(long).
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.