#generational-arena #arena #generational #thread #key

atomic-arena

Generational arena allows reserving keys from other threads

2 releases

0.1.1 May 15, 2022
0.1.0 Nov 28, 2021

#527 in Concurrency

Download history 1755/week @ 2023-11-26 2262/week @ 2023-12-03 2102/week @ 2023-12-10 1527/week @ 2023-12-17 1135/week @ 2023-12-24 1135/week @ 2023-12-31 1390/week @ 2024-01-07 1561/week @ 2024-01-14 1675/week @ 2024-01-21 1304/week @ 2024-01-28 1219/week @ 2024-02-04 1523/week @ 2024-02-11 1644/week @ 2024-02-18 1483/week @ 2024-02-25 2029/week @ 2024-03-03 759/week @ 2024-03-10

6,152 downloads per month
Used in 26 crates (via kira)

MIT/Apache

29KB
730 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