AbstractQueuedSynchronizer.TryRelease(Int32) 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", "(I)Z", "GetTryRelease_IHandler")]
protected virtual bool TryRelease (int arg);
[<Android.Runtime.Register("tryRelease", "(I)Z", "GetTryRelease_IHandler")>]
abstract member TryRelease : int -> bool
override this.TryRelease : int -> bool
Parameters
- arg
- Int32
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.AbstractQueuedSynchronizer.tryRelease(int)
.
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.