26 releases (breaking)

0.21.1 Aug 15, 2024
0.20.0 Jan 29, 2024
0.19.0 Dec 20, 2023
0.18.0 Nov 6, 2023
0.2.0 Mar 10, 2021

#122 in Concurrency

Download history 32/week @ 2024-09-14 46/week @ 2024-09-21 49/week @ 2024-09-28 7/week @ 2024-10-05 5/week @ 2024-11-16 4/week @ 2024-11-23 11/week @ 2024-11-30 74/week @ 2024-12-07 6/week @ 2024-12-14

81 downloads per month
Used in 11 crates (10 directly)

Apache-2.0

350KB
9K SLoC

This crate is used internally by TinyChain. It provides traits and data structures to support transactional mutations of in-memory and persistent datatypes.

Example:

use tc_transact::{TxnId, TxnLock};

let version = TxnLock::new("version", 0);

let txn_one = TxnId::new(1);
let txn_two = TxnId::new(2);
let txn_three = TxnId::new(3);

assert_eq!(version.read(txn_one).await.unwrap(), 0);

*(version.write(txn_two).await.unwrap()) = 2;
version.commit(txn_two).await;

assert_eq!(version.read(txn_three).await.unwrap(), 2);

For more information on TinyChain, see http://github.com/haydnv/tinychain


lib.rs:

Provides traits and data structures to define a distributed transaction context.

This library is part of TinyChain: http://github.com/haydnv/tinychain

Dependencies

~11–20MB
~276K SLoC