AbstractQueuedLongSynchronizer.TryRelease(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 set the state to reflect a release in exclusive mode.
[Android.Runtime.Register("tryRelease", "(J)Z", "GetTryRelease_JHandler")]
protected virtual bool TryRelease (long arg);
[<Android.Runtime.Register("tryRelease", "(J)Z", "GetTryRelease_JHandler")>]
abstract member TryRelease : int64 -> bool
override this.TryRelease : int64 -> bool
Parameters
- arg
- Int64
the release argument. This value is always the one passed to a release method, or the current state value upon entry to a condition wait. The value is otherwise uninterpreted and can represent anything you like.
Returns
true
if this object is now in a fully released
state, so that any waiting threads may attempt to acquire;
and false
otherwise.
- Attributes
Exceptions
if releasing 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
Attempts to set the state to reflect a release in exclusive mode.
This method is always invoked by the thread performing release.
The default implementation throws UnsupportedOperationException
.
Java documentation for java.util.concurrent.locks.AbstractQueuedLongSynchronizer.tryRelease(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.