Executes multiple hooks in parallel and awaits all their signal responses,
returning a keyed object of results. This is the recommended way to run
concurrent hooks — it solves a race condition where calling
Promise.all([execHook(), execHook()]) would throw before all waitFor
registrations complete.
Three-Phase Execution
Fire all hooks via Promise.all (registers streams immediately).
Await all signals via Promise.all (all waitFor registrations
happen together before any DurableWaitForError is thrown).
// All three results are available as typed properties const { synthesize } = Durable.workflow.proxyActivities<typeofactivities>(); returnawaitsynthesize( perspectives.optimistic, perspectives.skeptical, perspectives.neutral, ); }
Executes multiple hooks in parallel and awaits all their signal responses, returning a keyed object of results. This is the recommended way to run concurrent hooks — it solves a race condition where calling
Promise.all([execHook(), execHook()])would throw before allwaitForregistrations complete.Three-Phase Execution
Promise.all(registers streams immediately).Promise.all(allwaitForregistrations happen together before anyDurableWaitForErroris thrown).{ [key]: result }map.Examples