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

atomic-arena

Generational arena allows reserving keys from other threads

2 releases

0.1.1 May 15, 2022
0.1.0 Nov 28, 2021

#462 in Concurrency

Download history 1616/week @ 2024-07-24 1475/week @ 2024-07-31 1948/week @ 2024-08-07 1665/week @ 2024-08-14 1612/week @ 2024-08-21 1458/week @ 2024-08-28 1226/week @ 2024-09-04 1374/week @ 2024-09-11 1119/week @ 2024-09-18 1357/week @ 2024-09-25 1067/week @ 2024-10-02 927/week @ 2024-10-09 1552/week @ 2024-10-16 1460/week @ 2024-10-23 1443/week @ 2024-10-30 815/week @ 2024-11-06

5,536 downloads per month

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