[WIP] move towards lockless AtomTable

This commit is contained in:
Bennet Bleßmann
2023-08-28 23:24:27 +02:00
parent d24e6100a7
commit 01aeb7515d
17 changed files with 231 additions and 241 deletions

View File

@@ -1,5 +1,3 @@
use tokio::sync::RwLock;
use crate::atom_table::*;
use crate::parser::ast::*;
@@ -45,7 +43,7 @@ impl Into<Atom> for PartialString {
impl PartialString {
#[inline]
pub(super) fn new<'a>(src: &'a str, atom_tbl: &RwLock<AtomTable>) -> Option<(Self, &'a str)> {
pub(super) fn new<'a>(src: &'a str, atom_tbl: &AtomTable) -> Option<(Self, &'a str)> {
let terminator_idx = scan_for_terminator(src.chars());
let pstr = PartialString(AtomTable::build_with(&atom_tbl, &src[..terminator_idx]));
Some(if terminator_idx < src.as_bytes().len() {