#generational-arena #generational #arena #reservation #key #thread #across

atomic-arena

Generational arena that allows reserving keys from other threads

3 releases

0.1.2 Dec 30, 2024
0.1.1 May 15, 2022
0.1.0 Nov 28, 2021

#114 in Concurrency

Download history 1325/week @ 2024-09-28 832/week @ 2024-10-05 1256/week @ 2024-10-12 1479/week @ 2024-10-19 1532/week @ 2024-10-26 1350/week @ 2024-11-02 997/week @ 2024-11-09 1068/week @ 2024-11-16 1473/week @ 2024-11-23 1756/week @ 2024-11-30 1552/week @ 2024-12-07 1551/week @ 2024-12-14 656/week @ 2024-12-21 821/week @ 2024-12-28 1473/week @ 2025-01-04 1631/week @ 2025-01-11

4,791 downloads per month
Used in 30 crates (via kira)

MIT/Apache

30KB
747 lines

atomic-arena

crates.io | docs

atomic-arena is a generational arena that uses a reservation system to allow getting valid keys from different threads.

License

This project is licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE)
  • MIT license (LICENSE-MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in atomic-arena by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

atomic_arena provides a generational Arena that you can reserve a [Key] for ahead of time using a Controller. Controllers are backed by atomics, so they can be cloned and used across threads and still have consistent state.

This is useful when you want to insert an item into an Arena on a different thread, but you want to have a valid [Key] for that item immediately on the current thread.

No runtime deps