[WIP] make AtomTable concurrentcy ready

This commit is contained in:
Skgland
2023-08-26 01:10:49 +02:00
committed by Bennet Bleßmann
parent b2130c2a48
commit 86166dbf25
25 changed files with 528 additions and 384 deletions

View File

@@ -230,7 +230,8 @@ impl Machine {
pub fn load_file(&mut self, path: &str, stream: Stream) {
self.machine_st.registers[1] = stream_as_cell!(stream);
self.machine_st.registers[2] = atom_as_cell!(self.machine_st.atom_tbl.build_with(path));
self.machine_st.registers[2] =
atom_as_cell!(self.machine_st.atom_tbl.blocking_write().build_with(path));
self.run_module_predicate(atom!("loader"), (atom!("file_load"), 2));
}
@@ -295,7 +296,7 @@ impl Machine {
arg_pstrs.push(put_complete_string(
&mut self.machine_st.heap,
&arg,
&mut self.machine_st.atom_tbl,
&mut self.machine_st.atom_tbl.blocking_write(),
));
}