object Scheduler extends Scheduler
A global scheduler.
- Alphabetic
- By Inheritance
- Scheduler
- Scheduler
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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 apply(): Scheduler
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def blocking[T](f: => T)(implicit perm: CanAwait): T
Executes a function
f
in a blocking fashion. - def blockingTimeNanos: Long
Total time spent doing blocking operations, in nanoseconds.
Total time spent doing blocking operations, in nanoseconds.
This should only include time spent on threads where com.twitter.util.Awaitable.CanAwait.trackElapsedBlocking returns
true
.- returns
-1 if the Scheduler does not support tracking this.
- Definition Classes
- Scheduler → Scheduler
- Note
this does not include time spent doing blocking code outside of Scheduler.blocking. For example,
Future(someSlowSynchronousIO)
would not be accounted for here.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flush(): Unit
Flush the schedule.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def numDispatches: Long
The number of dispatches performed by this scheduler.
- def setUnsafe(sched: Scheduler): Unit
Swap out the current globally-set scheduler with another.
Swap out the current globally-set scheduler with another.
Note: This can be unsafe since some schedulers may be active, and flush() can be invoked on the wrong scheduler.
This can happen, for example, if a LocalScheduler is used while a future is resolved via Await.
- sched
the other Scheduler to swap in for the one that is currently set
- def submit(r: Runnable): Unit
Schedule
r
to be run at some time in the future. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()