sealed abstract class FrameIndexRef extends AnyRef
A reference that boxes a FrameIndex possibly using a thread-local.
This definition is of interest only when creating tasks with Task.unsafeCreate, which exposes internals and is considered unsafe to use.
In case the Task is executed with BatchedExecution, this class boxes a FrameIndex in order to transport it over light async boundaries, possibly using a ThreadLocal, since this index is not supposed to survive when threads get forked.
The FrameIndex is a counter that increments whenever a
flatMap
operation is evaluated. And with BatchedExecution
,
whenever that counter exceeds the specified threshold, an
asynchronous boundary is automatically inserted. However this
capability doesn't blend well with light asynchronous
boundaries, for example Async
tasks that never fork logical threads or
TrampolinedRunnable
instances executed by capable schedulers. This is why
FrameIndexRef is part of the Context of execution for
Task, available for asynchronous tasks that get created with
Task.unsafeCreate.
Note that in case the execution model is not
BatchedExecution
then this reference is just a dummy, since there's no point in
keeping a counter around, plus setting and fetching from a
ThreadLocal
can be quite expensive.
- Source
- Task.scala
- Alphabetic
- By Inheritance
- FrameIndexRef
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
:=(update: FrameIndex): Unit
Stores a new FrameIndex.
-
abstract
def
apply(): FrameIndex
Returns the current FrameIndex.
-
abstract
def
reset(): Unit
Resets the stored FrameIndex to 1, which is the default value that should be used after an asynchronous boundary happened.
Concrete 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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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
- 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()
-
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
This is the API documentation for the Monix library.
Package Overview
monix.execution exposes lower level primitives for dealing with asynchronous execution:
Atomic
types, as alternative tojava.util.concurrent.atomic
monix.eval is for dealing with evaluation of results, thus exposing Task and Coeval.
monix.reactive exposes the
Observable
pattern:Observable
implementationsmonix.types implements type-class shims, to be translated to type-classes provided by libraries such as Cats or Scalaz.
monix.cats is the optional integration with the Cats library, providing translations for the types described in
monix.types
.monix.scalaz is the optional integration with the Scalaz library, providing translations for the types described in
monix.types
.