Class Turn
- Namespace
- MarymoorStudios.Core.Promises
- Assembly
- MarymoorStudios.Core.Promises.dll
The basic unit of work in the scheduler.
public abstract class Turn
- Inheritance
-
Turn
- Derived
- Inherited Members
Remarks
A Turn can represent a single function, a complex prompt computation, an RPC method, an external IO or any other kind of prompt computation. A Turn is a single unit of prompt computation within a single-threaded Scheduler. Complex computations involving one or more blocking states or multiple IOs can be broken up into a directed graph of Turns, each of which is scheduled independently and are typically linked together through a chain of Promises. Such a complex computation is considered complete when the Promise returned by its root Turn resolves.
Constructors
Turn()
Creates a new unattached (not part of a list) turn.
protected Turn()
Properties
Id
A unique identifier for this turn.
public ulong Id { get; }
Property Value
Remarks
Ids are guaranteed to be monotonic.
Methods
Run()
protected abstract void Run()