replace mutex with rwlock
Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
parent
c7d0bba928
commit
e055f26e90
5 changed files with 72 additions and 54 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue