local-spawn-pool 0.1.0

Spawn `!Send` futures in a pool and await for all of them to finish. Standalone alternative to `tokio::task::LocalSet`.
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented1 out of 5 items with examples
  • Size
  • Source code size: 36.67 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.43 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 18s Average build duration of successful builds.
  • all releases: 18s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Mahdrentys

LocalSpawnPool

A pool of tasks to spawn futures and wait for them on a single thread.

It is inspired by and has almost the same functionality as tokio::task::LocalSet, but this standalone crate allows you to avoid importing the whole tokio crate if you don't need it.

In some cases, it is necessary to run one or more futures that do not implement Send and thus are unsafe to send between threads. In these cases, a LocalSpawnPool may be used to schedule one or more !Send futures to run together on the same thread.

See the documentation for more details.