createFiber

fun createFiber(    resultType: A_Type,     runtime: AvailRuntime,     loader: AvailLoader?,     textInterface: TextInterface,     priority: Int,     setup: A_Fiber.() -> Unit = { },     nameSupplier: () -> A_String): A_Fiber

Construct an unstartedfiber with the specified result type, name supplier, and AvailLoader. The priority is initially set to loaderPriority.

Return

The new fiber.

Parameters

resultType

The expected result type.

runtime

The AvailRuntime that will eventually be given the fiber to run.

loader

Either an AvailLoader or null.

textInterface

The TextInterface for providing console I/O in this fiber.

priority

An Int between 0 and 255 that affects how much of the CPU time will be allocated to the fiber.

setup

A function to run against the fiber before scheduling it. The function execution happens before any debugger hooks run.

nameSupplier

A supplier that produces an Avail string to name this fiber on demand. Please don't run Avail code to do so, since if this is evaluated during fiber execution it will cause the current Thread's execution to block, potentially starving the execution pool.