]> Repositorios git - scryer-prolog.git/commit
remove locks from AtomTable
authorBennet Bleßmann <[email protected]>
Sat, 2 Sep 2023 19:31:01 +0000 (21:31 +0200)
committerBennet Bleßmann <[email protected]>
Tue, 5 Sep 2023 17:39:59 +0000 (19:39 +0200)
commitc7ec5a13a5a65576b907a9a02fd6096e4bdd1ec2
tree5c748b0f545c929ecf7d2bc304e4ff6ee80000c4
parent01aeb7515d4b7b4f08de771db0f3de231d59518f
remove locks from AtomTable

there are technically still two locks
- the Mutex to serialize consurrent updates to the AtomTable
- the RwLock as part of GLOBAL_ATOM_TABLE

the former is the age lock of RESIZE ATOM TABLE in <https://arxiv.org/pdf/1608.00989.pdf>, though we use it for the whole update as we don't match the whole structure and can't reserve an atom slot as is, so we need to also lock concurrent updates without resizing

the later should be uncontendet as we only write AtomTable::new iff the current value is a dangling Weak
flamegraph.svg [new file with mode: 0644]
src/atom_table.rs
src/lib.rs
src/rcu.rs [new file with mode: 0644]
src/repl_helper.rs