Crates.io | async-stm |
lib.rs | async-stm |
version | 0.5.0 |
source | src |
created_at | 2022-03-23 13:48:54.883879 |
updated_at | 2024-05-09 18:06:33.106311 |
description | Asynchronous Software Transactional Memory |
homepage | |
repository | https://github.com/aakoshh/async-stm-rs |
max_upload_size | |
id | 555242 |
size | 64,818 |
async-stm
is an implementation of Software Transactional Memory.
It was originally inspired by rust-stm,
but does things sligly differently, in a more traditional fashion.
It was also extended in the following ways:
atomically
asynchronous, so STM operations can be used with tokio
without blocking a full thread.abort
a transaction with an error, which the caller has to handle.TVar
API.TVar
returns an Arc
, so cloning can be delayed until we have to modify the result.Please look at the tests for example usage.
Install the following to be be able to build the project:
curl https://sh.rustup.rs -sSf | sh
rustup toolchain install nightly
rustup default stable
rustup update
There are benchmarks included to help compare the tradeoffs between the different queue implementations.
cargo +nightly bench "bench" --all-features
This project is licensed under the MIT license.