Single Spawn
spawned work independence
function* submitOrder() {
yield* spawn(function* sendReceiptEmail() {
yield* sleep(1000);
return "receipt sent";
});
return "order accepted";
} submitOrder starts sendReceiptEmail as a spawned process.
submitOrder returns order accepted without waiting for sendReceiptEmail.