AvailRuntimeSupport

A static class for common Avail utility operations.

Types

Link copied to clipboard
class AvailLazyFuture<T>(val runtime: AvailRuntime, val priority: Int = compilerPriority, val computation: ((T) -> Unit) -> Unit)

An implementation of a lazy future, using the runtime's execution pool. If the value is never requested, it never not run the computation. Otherwise, the first invocation of withValue causes the computation to run in a task (when it's safe to run interpreters).

Link copied to clipboard
class Clock

Utility class for wrapping a volatile counter that can be polled.

Functions

Link copied to clipboard

Capture the current time with nanosecond precision (but not necessarily accuracy). If per-thread accounting is available, use it.

Link copied to clipboard

Answer the next unused fiber identifier. Fiber identifiers will not repeat for 2^32 invocations.

Link copied to clipboard

Answer a new value suitable for use as the hash code for an immutable value.

Link copied to clipboard

Answer a new non-zero value suitable for use as the hash code for an immutable value.