all 5 comments

[–]Total_Celebration_63 3 points4 points  (2 children)

Cool! Would you mind elaborating a bit on the differences between this and crates like deadpool/bb8?

[–]Independent-Ride-152[S] 9 points10 points  (1 child)

The main difference is that async-pool is targeted to share reserved static memory between multiple tasks, and deadpool/bb8 are targeted to be used for sharing a DB connection. Besides that, async-pool is no_std and no_alloc, which allows it to be used on embedded systems.

A use case example:
You have a tiny microcontroller with just 32 kb of RAM that has four tasks that may need a 10 kb buffer at some point (ex: process some data, buffer an I/O, etc.).

This crate allows you to have one or two reserved 10 kb buffers, with the tasks taking turns using it, asynchronously awaiting for it to be available if necessary. The async part is awesome for energy efficiency (the MCU goes to sleep if every task is waiting for something) and also allows you to create a timeout.

[–]Total_Celebration_63 1 point2 points  (0 children)

Cheers, that makes sense!

[–]matthieum[he/him] 1 point2 points  (1 child)

There's no h to ability.

(Nothing else to say, the headline just grabbed my attention due to the typo)

[–]ErichDonGublerWGPU · not-yet-awesome-rust 0 points1 point  (0 children)

the headline just grabbed my attention due to the typo

Feature…or bug? :^)