[WIP] fix deadlock in AtomTable::build_with
This commit is contained in:
@@ -708,11 +708,8 @@ mod tests {
|
||||
|
||||
// first a 'dangling' partial string, later modified to be a two-part complete string,
|
||||
// then a three-part cyclic string involving an uncompacted list of chars.
|
||||
let pstr_var_cell = put_partial_string(
|
||||
&mut wam.machine_st.heap,
|
||||
"abc ",
|
||||
&mut wam.machine_st.atom_tbl.blocking_write(),
|
||||
);
|
||||
let pstr_var_cell =
|
||||
put_partial_string(&mut wam.machine_st.heap, "abc ", &wam.machine_st.atom_tbl);
|
||||
let pstr_cell = wam.machine_st.heap[pstr_var_cell.get_value() as usize];
|
||||
|
||||
{
|
||||
@@ -733,11 +730,8 @@ mod tests {
|
||||
wam.machine_st.heap.pop();
|
||||
wam.machine_st.heap.push(pstr_loc_as_cell!(2));
|
||||
|
||||
let pstr_second_var_cell = put_partial_string(
|
||||
&mut wam.machine_st.heap,
|
||||
"def",
|
||||
&mut wam.machine_st.atom_tbl.blocking_write(),
|
||||
);
|
||||
let pstr_second_var_cell =
|
||||
put_partial_string(&mut wam.machine_st.heap, "def", &wam.machine_st.atom_tbl);
|
||||
|
||||
let pstr_second_cell = wam.machine_st.heap[pstr_second_var_cell.get_value() as usize];
|
||||
|
||||
@@ -1776,11 +1770,8 @@ mod tests {
|
||||
// two-part complete string, then a three-part cyclic string
|
||||
// involving an uncompacted list of chars.
|
||||
|
||||
let pstr_var_cell = put_partial_string(
|
||||
&mut wam.machine_st.heap,
|
||||
"abc ",
|
||||
&mut wam.machine_st.atom_tbl.blocking_write(),
|
||||
);
|
||||
let pstr_var_cell =
|
||||
put_partial_string(&mut wam.machine_st.heap, "abc ", &wam.machine_st.atom_tbl);
|
||||
let pstr_cell = wam.machine_st.heap[pstr_var_cell.get_value() as usize];
|
||||
|
||||
{
|
||||
@@ -1804,11 +1795,8 @@ mod tests {
|
||||
wam.machine_st.heap.pop();
|
||||
wam.machine_st.heap.push(heap_loc_as_cell!(2));
|
||||
|
||||
let pstr_second_var_cell = put_partial_string(
|
||||
&mut wam.machine_st.heap,
|
||||
"def",
|
||||
&mut wam.machine_st.atom_tbl.blocking_write(),
|
||||
);
|
||||
let pstr_second_var_cell =
|
||||
put_partial_string(&mut wam.machine_st.heap, "def", &wam.machine_st.atom_tbl);
|
||||
let pstr_second_cell = wam.machine_st.heap[pstr_second_var_cell.get_value() as usize];
|
||||
|
||||
{
|
||||
@@ -2375,11 +2363,8 @@ mod tests {
|
||||
// two-part complete string, then a three-part cyclic string
|
||||
// involving an uncompacted list of chars.
|
||||
|
||||
let pstr_var_cell = put_partial_string(
|
||||
&mut wam.machine_st.heap,
|
||||
"abc ",
|
||||
&mut wam.machine_st.atom_tbl.blocking_write(),
|
||||
);
|
||||
let pstr_var_cell =
|
||||
put_partial_string(&mut wam.machine_st.heap, "abc ", &wam.machine_st.atom_tbl);
|
||||
let pstr_cell = wam.machine_st.heap[pstr_var_cell.get_value() as usize];
|
||||
|
||||
{
|
||||
@@ -2402,11 +2387,8 @@ mod tests {
|
||||
wam.machine_st.heap.pop();
|
||||
wam.machine_st.heap.push(pstr_loc_as_cell!(2));
|
||||
|
||||
let pstr_second_var_cell = put_partial_string(
|
||||
&mut wam.machine_st.heap,
|
||||
"def",
|
||||
&mut wam.machine_st.atom_tbl.blocking_write(),
|
||||
);
|
||||
let pstr_second_var_cell =
|
||||
put_partial_string(&mut wam.machine_st.heap, "def", &wam.machine_st.atom_tbl);
|
||||
let pstr_second_cell = wam.machine_st.heap[pstr_second_var_cell.get_value() as usize];
|
||||
|
||||
{
|
||||
@@ -2838,11 +2820,8 @@ mod tests {
|
||||
// two-part complete string, then a three-part cyclic string
|
||||
// involving an uncompacted list of chars.
|
||||
|
||||
let pstr_var_cell = put_partial_string(
|
||||
&mut wam.machine_st.heap,
|
||||
"abc ",
|
||||
&mut wam.machine_st.atom_tbl.blocking_write(),
|
||||
);
|
||||
let pstr_var_cell =
|
||||
put_partial_string(&mut wam.machine_st.heap, "abc ", &wam.machine_st.atom_tbl);
|
||||
let pstr_cell = wam.machine_st.heap[pstr_var_cell.get_value() as usize];
|
||||
|
||||
{
|
||||
@@ -2862,11 +2841,8 @@ mod tests {
|
||||
wam.machine_st.heap.pop();
|
||||
wam.machine_st.heap.push(pstr_loc_as_cell!(2));
|
||||
|
||||
let pstr_second_var_cell = put_partial_string(
|
||||
&mut wam.machine_st.heap,
|
||||
"def",
|
||||
&mut wam.machine_st.atom_tbl.blocking_write(),
|
||||
);
|
||||
let pstr_second_var_cell =
|
||||
put_partial_string(&mut wam.machine_st.heap, "def", &wam.machine_st.atom_tbl);
|
||||
|
||||
let pstr_second_cell = wam.machine_st.heap[pstr_second_var_cell.get_value() as usize];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user