replace mutex with rwlock

Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
Ava Hahn 2023-02-20 19:42:48 -08:00
parent c7d0bba928
commit e055f26e90
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
5 changed files with 72 additions and 54 deletions

View file

@ -36,11 +36,10 @@ pub fn eval (
let mut cdr = Box::from(Ctr::None);
// lets me redirect the input
let table_handle = SYM_TABLE.read().unwrap();
let mut arg_car = &ast.car;
let mut arg_cdr = &ast.cdr;
let table_handle = SYM_TABLE.lock().unwrap();
// iterate over ast and build out ret
let mut none = false;
while !none {
@ -68,7 +67,6 @@ pub fn eval (
}
}
// im tired please simplify this
Ctr::Symbol(_) => {
if simplify_function_branches && first {
if let Some(func) = prefetched_function {