Package

monix.execution

annotations

Permalink

package annotations

Visibility
  1. Public
  2. All

Type Members

  1. class Unsafe extends Annotation with StaticAnnotation

    Permalink

    An annotation meant to warn users on unsafe functions.

    An annotation meant to warn users on unsafe functions.

    "Unsafe" can include behavior such as:

  2. class UnsafeBecauseBlocking extends Unsafe

    Permalink

    An annotation meant to warn users on functions that are triggering blocking operations.

    An annotation meant to warn users on functions that are triggering blocking operations.

    Blocking threads is unsafe because:

    • the user has to be aware of the configuration of the underlying thread-pool, which should be preferably unbounded, or otherwise it can suffer from thread starvation
    • it's not supported on top of JavaScript

    Prefer to avoid blocking operations.

  3. class UnsafeBecauseImpure extends Unsafe

    Permalink

    An annotation meant to warn users on functions that are breaking referential transparency.

    An annotation meant to warn users on functions that are breaking referential transparency.

    Such operations are unsafe in a context where purity is expected. Note however that most data types defined in monix.execution are impure.

  4. class UnsafeProtocol extends Unsafe

    Permalink

    An annotation meant to warn users on functions that are using an error prone protocol.

    An annotation meant to warn users on functions that are using an error prone protocol.

    An example of such a protocol is the one defined at reactive-streams.org, being unsafe because its safe usage requires deep knowledge of it, having lots of cases in which the compiler does not and cannot help, leading to undefined behavior if not careful.

    Only use such functions if familiar with the underlying protocol.

Ungrouped