class Flag extends Semaphore
A synchronization object that supports a single thread
waiting until some other thread enables it to proceed.
Functionally equivalent to (but considerably more efficient than) a
BooleanSemaphore(false)
that can be release
d once.
- Alphabetic
- By Inheritance
- Flag
- Semaphore
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Flag(name: String = null)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
acquire(): Unit
Causes the current thread to wait until the flag is available.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cancel(): Unit
Interrupt a stalled acquiring thread
-
def
cancelled(): Boolean
True if the most recent semaphore acquisition was cancelled
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
down(): Unit
same as acquire
same as acquire
- Definition Classes
- Semaphore
- Annotations
- @inline()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getWaiting: Seq[Thread]
Return an (approximate) list of the threads waiting to acquire a token from this semaphore.
Return an (approximate) list of the threads waiting to acquire a token from this semaphore. Intended for use only by diagnostic components.
- Definition Classes
- Semaphore
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- var name: String
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
release(): Unit
Raise the flag; permitting an
acquire
ing process to proceed. -
def
remaining(): Int
Approximation to the number of acquires that could now succeed without having to wait.
Approximation to the number of acquires that could now succeed without having to wait. Intended for use only by diagnostic components.
- Definition Classes
- Semaphore
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Flag → AnyRef → Any
-
def
tryAcquire(timeoutNS: Long): Boolean
Causes the current thread to wait until the flag is
release
d (returning true) or until the specified timeout has elapsed (returning false). -
def
up(): Unit
same as release
same as release
- Definition Classes
- Semaphore
- Annotations
- @inline()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )