heed & heed3
This release brings a new functionality: the possibility to create multiple nested read transactions from an uncommitted write transaction. You can also examine another usage in the dedicated example file.
We finally merged the changes to upstream LMDB (mdb.master3), and the patch has been thoroughly reviewed by Howard Chu.
// opening a write transaction
let mut wtxn = env.write_txn()?;
// [use the RwTxn to write into the env]
// opening multiple read-only transactions without committing beforehand
let rtxns = (0..1000).map(|_| env.nested_read_txn(&wtxn)).collect::<heed::Result<Vec<_>>>()?;
// you can also spawn nested read transactions from the write txn too
let rtxns = (0..1000).map(|_| wtxn.nested_read_txn()).collect::<heed::Result<Vec<_>>>()?;
// [use the RoTxns and move them onto different threads]