MorphismBase: fix deadlock

This commit is contained in:
Michael Sippel 2024-01-18 18:18:14 +01:00
parent 8471c7a90f
commit fdf2d60b35
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -80,7 +80,8 @@ impl MorphismBase {
repr_tree: Arc<RwLock<ReprTree>>, repr_tree: Arc<RwLock<ReprTree>>,
target_type: &TypeTerm target_type: &TypeTerm
) { ) {
if let Some((m, σ)) = self.find_morphism( repr_tree.read().unwrap().get_type(), target_type ) { let t = repr_tree.read().unwrap().get_type().clone();
if let Some((m, σ)) = self.find_morphism( &t, target_type ) {
(m.repr_tree_op)( repr_tree.clone(), &σ ); (m.repr_tree_op)( repr_tree.clone(), &σ );
} else { } else {
eprintln!("could not find morphism"); eprintln!("could not find morphism");