A promise that resolves when the task is either completed or cancelled or rejects if parent listener execution is cancelled or completed.
const result = await fork(async (forkApi) => Promise.resolve(4)).resultif(result.status === 'ok') { console.log(result.value) // logs 4}}
Cancel task if it is in progress or not yet started, it is noop otherwise.
Generated using TypeDoc
A promise that resolves when the task is either completed or cancelled or rejects if parent listener execution is cancelled or completed.
Example