2 releases
new 0.1.1 | Feb 21, 2025 |
---|---|
0.1.0 | Feb 21, 2025 |
#410 in Simulation
Used in odem-rs
475KB
7.5K
SLoC
ODEM-rs Sync
odem-rs-sync
provides synchronization primitives and communication structures for agent-job interactions in
ODEM-rs simulations.
Features
- Internal cooperative concurrency by extending simulation contexts with forking.
- MPMC channels to connect agents.
- Control expressions allowing to model state-events in addition to the standard time-events provided by the scheduler.
- A GPSS-inspired facility to model exclusive resources.
Dynamically sized backing stores for the channels require the alloc
-feature. Channels themselves can either be created
on the heap using a free channel
-function like in Rust's standard library which requires alloc
as well, or pinned on
the stack for the no_std
solution. Everything else is no_std
.
Installation
This crate is meant as a dependency to the odem-rs
entry crate, but it is possible to use it in combination
with the simulator core defined in the odem-rs-code
crate. To install, add the following line to your Cargo.toml
.
[dependencies]
odem-rs-sync = "*"
License
Licensed under MIT. See LICENSE for details.
Dependencies
~4–6MB
~123K SLoC