1 unstable release
0.1.0 | Dec 24, 2023 |
---|
#858 in Concurrency
24 downloads per month
20KB
249 lines
Shared Resources
This crate provides a shared resources container which is thread-safe, and lock-free.
The Resources
struct, is a container of Resource
objects. Resources are
inserted at run-time. The container stores up to 1 instance of each type.
Stored resources can be accessed by the rest of the system through
an immutable reference. Borrowing rules are checked at run-time.
Thread-safe access is provided by the ResourcesSync
struct. It's similar to
the Resources
struct, except it only allows access to thread-safe resources,
and can, itself, be sent to other threads.
The design is based heavily on the
Resources
struct found in Legion, with the goal of
making it better-suited for general use-cases.
Status
Shared Resources is mostly complete. Things may still change until release 1.0.
License
Shared Resources is licensed under either:
At your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without additional terms or conditions.
Dependencies
~53KB