DeferredModule
PackageAxial
Flow-native helpers for one-shot typed coordination.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| make | Deferred.make () | Creates an empty deferred value. |
| await | Deferred.await (Deferred signal) | Waits for the deferred outcome, preserving success, typed failure, defect, or interruption. |
| complete | Deferred.complete exit (Deferred signal) | Attempts to complete the deferred value with a full outcome. |
| succeed | Deferred.succeed value deferred | Attempts to complete the deferred value successfully. |
| fail | Deferred.fail error deferred | Attempts to complete the deferred value with a typed failure. |
| die | Deferred.die error deferred | Attempts to complete the deferred value with a defect. |
| interrupt | Deferred.interrupt deferred | Attempts to complete the deferred value as interrupted. |
Creates an empty deferred value.
Parameters
| Name | Type | Description |
|---|---|---|
| unit |
Returns
Flow<'env, 'error, Deferred<'error, 'value>>
Waits for the deferred outcome, preserving success, typed failure, defect, or interruption.
Parameters
| Name | Type | Description |
|---|---|---|
| Deferred signal | Deferred<'error, 'value> |
Returns
Flow<'env, 'error, 'value>
Attempts to complete the deferred value with a full outcome.
Parameters
| Name | Type | Description |
|---|---|---|
| exit | Exit<'value, 'error> | |
| Deferred signal | Deferred<'error, 'value> |
Returns
Flow<'env, 'workflowError, bool>
Attempts to complete the deferred value successfully.
Parameters
| Name | Type | Description |
|---|---|---|
| value | 'value | |
| deferred | Deferred<'error, 'value> |
Returns
Flow<'env, 'workflowError, bool>
Attempts to complete the deferred value with a typed failure.
Parameters
| Name | Type | Description |
|---|---|---|
| error | 'error | |
| deferred | Deferred<'error, 'value> |
Returns
Flow<'env, 'workflowError, bool>
Attempts to complete the deferred value with a defect.
Parameters
| Name | Type | Description |
|---|---|---|
| error | exn | |
| deferred | Deferred<'error, 'value> |
Returns
Flow<'env, 'workflowError, bool>

