Skip to content

FiberId

23 exports Added in v2.0.0 Source

Constructors

combine

Added in v2.0.0 Source

Combine two FiberIds.

Signature

declare const combine: {
  (that: FiberId): (self: FiberId) => FiberId;
  (self: FiberId, that: FiberId): FiberId;
};

combineAll

Added in v2.0.0 Source

Combines a set of FiberIds into a single FiberId.

Signature

declare const combineAll: (fiberIds: HashSet.HashSet<FiberId>) => FiberId;

composite

Added in v2.0.0 Source

Signature

declare const composite: (left: FiberId, right: FiberId) => Composite;

make

Added in v2.0.0 Source

Creates a new FiberId.

Signature

declare const make: (id: number, startTimeSeconds: number) => FiberId;

none

Added in v2.0.0 Source

Signature

declare const none: None;

runtime

Added in v2.0.0 Source

Signature

declare const runtime: (id: number, startTimeMillis: number) => Runtime;

Destructors

ids

Added in v2.0.0 Source

Get the set of identifiers for this FiberId.

Signature

declare const ids: (self: FiberId) => HashSet.HashSet<number>;

threadName

Added in v2.0.0 Source

Creates a string representing the name of the current thread of execution represented by the specified FiberId.

Signature

declare const threadName: (self: FiberId) => string;

toOption

Added in v2.0.0 Source

Convert a FiberId into an Option<FiberId>.

Signature

declare const toOption: (self: FiberId) => Option.Option<FiberId>;

toSet

Added in v2.0.0 Source

Convert a FiberId into a HashSet<FiberId>.

Signature

declare const toSet: (self: FiberId) => HashSet.HashSet<Runtime>;

Models

Composite interface

Added in v2.0.0 Source

Signature

interface Composite extends Equal, Inspectable {
  readonly _tag: "Composite";
  readonly [FiberIdTypeId]: typeof FiberIdTypeId;
  readonly left: FiberId;
  readonly right: FiberId;
}

FiberId type

Added in v2.0.0 Source

Signature

type FiberId = Single | Composite;

None interface

Added in v2.0.0 Source

Signature

interface None extends Equal, Inspectable {
  readonly _tag: "None";
  readonly [FiberIdTypeId]: typeof FiberIdTypeId;
  readonly id: -1;
  readonly startTimeMillis: -1;
}

Runtime interface

Added in v2.0.0 Source

Signature

interface Runtime extends Equal, Inspectable {
  readonly _tag: "Runtime";
  readonly [FiberIdTypeId]: typeof FiberIdTypeId;
  readonly id: number;
  readonly startTimeMillis: number;
}

Single type

Added in v2.0.0 Source

Signature

type Single = None | Runtime;

Refinements

isComposite

Added in v2.0.0 Source

Returns true if the FiberId is a Composite, false otherwise.

Signature

declare const isComposite: (self: FiberId) => self is Composite;

isFiberId

Added in v2.0.0 Source

Returns true if the specified unknown value is a FiberId, false otherwise.

Signature

declare const isFiberId: (self: unknown) => self is FiberId;

isNone

Added in v2.0.0 Source

Returns true if the FiberId is a None, false otherwise.

Signature

declare const isNone: (self: FiberId) => self is None;

isRuntime

Added in v2.0.0 Source

Returns true if the FiberId is a Runtime, false otherwise.

Signature

declare const isRuntime: (self: FiberId) => self is Runtime;

Symbols

Signature

declare const FiberIdTypeId: unique symbol;

FiberIdTypeId type

Added in v2.0.0 Source

Signature

type FiberIdTypeId = typeof FiberIdTypeId;

Unsafe

unsafeMake

Added in v2.0.0 Source

Unsafely creates a new FiberId.

Signature

declare const unsafeMake: (_: void) => Runtime;

Utils

getOrElse

Added in v2.0.0 Source

Returns this FiberId if it is not None, otherwise returns that FiberId.

Signature

declare const getOrElse: {
  (that: FiberId): (self: FiberId) => FiberId;
  (self: FiberId, that: FiberId): FiberId;
};