PollingExecutorScheduler

cats.effect.unsafe.PollingExecutorScheduler
abstract class PollingExecutorScheduler(pollEvery: Int) extends ExecutionContextExecutor with Scheduler

Attributes

Source:
PollingExecutorScheduler.scala
Graph
Supertypes
trait Scheduler
trait Executor
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

protected def poll(timeout: Duration): Boolean

Attributes

timeout

the maximum duration for which to block. ''However'', if timeout == Inf and there are no remaining events to poll for, this method should return false immediately. This is unfortunate but necessary so that this ExecutionContext can yield to the Scala Native global ExecutionContext which is currently hard-coded into every test framework, including JUnit, MUnit, and specs2.

Returns:

whether poll should be called again (i.e., there are more events to be polled)

Source:
PollingExecutorScheduler.scala

Concrete methods

final def execute(runnable: Runnable): Unit
override def nowMicros(): Long

Attributes

Definition Classes
Source:
PollingExecutorScheduler.scala
final def sleep(delay: FiniteDuration, task: Runnable): Runnable

Schedules a side-effect to run after the delay interval. Produces another side-effect which cancels the scheduling.

Schedules a side-effect to run after the delay interval. Produces another side-effect which cancels the scheduling.

Attributes

Source:
PollingExecutorScheduler.scala

Deprecated and Inherited methods

Attributes

Deprecated
[Since version 2.12.0] preparation of ExecutionContexts will be removed
Inherited from:
ExecutionContext