Check out the wiki page for exectx
.
-
Context ⇐
Execution
A cancelable that holds mutable values and can inherit from other contexts and executions.
- Execution
A cancelable that can inherit cancellation of other contexts and executions.
-
ExecutionSlot ⇐
Execution
A cancelable that holds one execution simultaneously and cancels executions when replaced.
-
executionFunc(innerFunc, options) ⇒
ExecutionFunc
Transforms a function so that it always receives an execution as the last argument and only runs the function for one execution at a time. That is, if the function returned from
executionFunc(innerFunc)
is called with an execution, such as(...args, executionA)
, and is later called with a different execution before the previous call has finished (or the returned promise has been resolved), such as(...args, executionB)
, the execution passed to thefunc
will be canceled. On the other hand, if it's called with the sameexecutionA
, the same value will be returned as from the previous call.-
executionResolve(options) ⇒
RT
|Promise.<(RT|void)>
Resolves the specified value and applies any specified options, such as formatting the resolved value, handling interruptions, using default executions, nesting executions properly, and so on. It is useful if you don't know if a value will be resolved synchronously or asynchronously, and returning a promise in case any of the specified options leads to any asynchronicity. It can also be used as a tool for resolving expensive values.
-
executionRun(execution, ...actions) ⇒
RunReturnValue.<T>
Runs one or more actions for an execution and returns the value returned from the last action.
-
nestContext(options) ⇒
Execution
Makes a child context that inherits cancellation-state and values from any number of parent(s). It can be pre-constructed by specifying a
child
or constructed using a customconstructor
.-
nestExecution(options) ⇒
Execution
Makes a child execution that inherits cancellation-state from any number of parent(s). It can be pre-constructed by specifying a
child
or constructed using acustomConstructor
.-
parseExecutionsArg(arg) ⇒
Array.<Execution>
Parses loosely specified executions into an array of valid executions.
- Ludvig Aldén @ludvigalden