mirror of
https://github.com/status-im/nim-taskpools.git
synced 2026-08-31 03:11:13 +00:00
Ported from [Constantine threadpool](https://github.com/mratsim/constantine/tree/master/constantine/threadpool) (https://github.com/mratsim/constantine/pull/224) Changes: - Add a futex per task to await on result completion - Move `sync` from flowvars to taskpools and deprecate `forceFuture` The downside is awaiting a future may consume local tasks that may not possibly help advancing the awaited future, but only if cannot steal a task, and the awaited task happens to be in progress. Still better than current release v0.1.0 behavior, which is fixed in #58. The upside is external threads (non taskpools workers) will sleep instead of always busy wait.