RunHandle
A run admitted by GraphRuntime.start, GraphRuntime.recover or GraphRuntime.resume. Its thread was claimed before the handle was returned, and the run executes on a virtual thread owned by the runtime, named llm4s-run-<threadId>, which holds the thread until it exits.
Attributes
- Source
- RunHandle.scala
- Graph
-
- Supertypes
Members list
Value members
Abstract methods
Blocks until the run ends and returns its result; the result is retained, so every call returns the same value. If the awaiting thread is interrupted, returns Left(CancelledError) with the interrupt flag still set, and the run continues: only cancel stops a run. A run that ends Failed with GraphError.ClaimLost may be recovered once its thread is free; see there. A run whose closing commit stuck in the store ends GraphError.CommitTimedOut, with its thread free; read the thread before acting on it.
Blocks until the run ends and returns its result; the result is retained, so every call returns the same value. If the awaiting thread is interrupted, returns Left(CancelledError) with the interrupt flag still set, and the run continues: only cancel stops a run. A run that ends Failed with GraphError.ClaimLost may be recovered once its thread is free; see there. A run whose closing commit stuck in the store ends GraphError.CommitTimedOut, with its thread free; read the thread before acting on it.
Attributes
- Source
- RunHandle.scala
Cancels the run by interrupting its thread; see GraphError.Cancelled. Returns at once and is idempotent. A no-op once the run has ended, and once it has begun closing: committing its outcome (completed, suspended or failed), stopping on a store failure or a crash, or stopping because it lost its claim (GraphError.ClaimLost). What it is closing is not interrupted - neither its commits nor the release of its claim - and the run ends with it. A cancel that interrupts a superstep's commit still ends the run Cancelled, even if the store reports that commit as failed.
Cancels the run by interrupting its thread; see GraphError.Cancelled. Returns at once and is idempotent. A no-op once the run has ended, and once it has begun closing: committing its outcome (completed, suspended or failed), stopping on a store failure or a crash, or stopping because it lost its claim (GraphError.ClaimLost). What it is closing is not interrupted - neither its commits nor the release of its claim - and the run ends with it. A cancel that interrupts a superstep's commit still ends the run Cancelled, even if the store reports that commit as failed.
Attributes
- Source
- RunHandle.scala
The subscription of the Observer this run was admitted with; None without one. Like any subscription it is the thread's and keeps delivering later runs: cancel it when done.
The subscription of the Observer this run was admitted with; None without one. Like any subscription it is the thread's and keeps delivering later runs: cancel it when done.
Attributes
- Source
- RunHandle.scala
Attributes
- Source
- RunHandle.scala
Non-blocking: Running until the run's result is set, then the result's case.
Non-blocking: Running until the run's result is set, then the result's case.
Attributes
- Source
- RunHandle.scala
Subscribes to the run's thread from just before this run's claim event, so it replays this run from its start whenever it is called; see GraphRuntime.subscribe. The subscription is the thread's, not the run's: it keeps delivering later runs on the same thread, and holds its parked dispatcher thread until Subscription.cancel is called. Like every subscription, it delivers live only the commits made through this handle's GraphRuntime. With nested, it also receives the events of the children the thread's runs delegate to, as StreamEvent.Nested (design 4.47).
Subscribes to the run's thread from just before this run's claim event, so it replays this run from its start whenever it is called; see GraphRuntime.subscribe. The subscription is the thread's, not the run's: it keeps delivering later runs on the same thread, and holds its parked dispatcher thread until Subscription.cancel is called. Like every subscription, it delivers live only the commits made through this handle's GraphRuntime. With nested, it also receives the events of the children the thread's runs delegate to, as StreamEvent.Nested (design 4.47).
Attributes
- Source
- RunHandle.scala
Attributes
- Source
- RunHandle.scala
