release

fun release(arg: Int): Boolean

Releases in exclusive mode. Implemented by unblocking one or more threads if .tryRelease returns true. This method can be used to implement method Lock.unlock.

Return

the value returned from .tryRelease

Parameters

arg

the release argument. This value is conveyed to .tryRelease but is otherwise uninterpreted and can represent anything you like.