soulfire.concurrency

Functions

parallel(→ effect_py.Effect[tuple[A, ...], E, R])

Run bounded workers, fail fast, and await every worker's cleanup.

race(→ effect_py.Effect[A, E, R])

Return the first success and await all losing fibers' cleanup.

Module Contents

soulfire.concurrency.parallel[A, E, R](effects: collections.abc.Iterable[effect_py.Effect[A, E, R]], *, concurrency: int = 8) → effect_py.Effect[tuple[A, ...], E, R][source]

Run bounded workers, fail fast, and await every worker’s cleanup.

soulfire.concurrency.race[A, E, R](first: effect_py.Effect[A, E, R], *others: effect_py.Effect[A, E, R]) → effect_py.Effect[A, E, R][source]

Return the first success and await all losing fibers’ cleanup.