FiberId
Constructors
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;Signature
declare const composite: (left: FiberId, right: FiberId) => Composite;Creates a new FiberId.
Signature
declare const make: (id: number, startTimeSeconds: number) => FiberId;Signature
declare const none: None;Signature
declare const runtime: (id: number, startTimeMillis: number) => Runtime;Destructors
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;Convert a FiberId into an Option<FiberId>.
Signature
declare const toOption: (self: FiberId) => Option.Option<FiberId>;Convert a FiberId into a HashSet<FiberId>.
Signature
declare const toSet: (self: FiberId) => HashSet.HashSet<Runtime>;Models
Signature
interface Composite extends Equal, Inspectable {
readonly _tag: "Composite";
readonly [FiberIdTypeId]: typeof FiberIdTypeId;
readonly left: FiberId;
readonly right: FiberId;
}Signature
type FiberId = Single | Composite;Signature
interface None extends Equal, Inspectable {
readonly _tag: "None";
readonly [FiberIdTypeId]: typeof FiberIdTypeId;
readonly id: -1;
readonly startTimeMillis: -1;
}Signature
interface Runtime extends Equal, Inspectable {
readonly _tag: "Runtime";
readonly [FiberIdTypeId]: typeof FiberIdTypeId;
readonly id: number;
readonly startTimeMillis: number;
}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;Returns true if the specified unknown value is a FiberId, false otherwise.
Signature
declare const isFiberId: (self: unknown) => self is FiberId;Returns true if the FiberId is a None, false otherwise.
Signature
declare const isNone: (self: FiberId) => self is None;Returns true if the FiberId is a Runtime, false otherwise.
Signature
declare const isRuntime: (self: FiberId) => self is Runtime;Symbols
FiberIdTypeId
Added in v2.0.0
Source
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;
Combine two
FiberIds.