From 99bceb6fb7d5a2ea37fd71cce6ff49f77e213d22 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Sat, 10 Sep 2022 20:26:39 +0900 Subject: [PATCH] Fix deadlock --- vm/src/builtins/staticmethod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vm/src/builtins/staticmethod.rs b/vm/src/builtins/staticmethod.rs index 9bb8dc296..c2d81fb9a 100644 --- a/vm/src/builtins/staticmethod.rs +++ b/vm/src/builtins/staticmethod.rs @@ -179,7 +179,8 @@ impl Callable for PyStaticMethod { type Args = FuncArgs; #[inline] fn call(zelf: &crate::Py, args: FuncArgs, vm: &VirtualMachine) -> PyResult { - vm.invoke(&zelf.callable.lock().clone(), args) + let callable = zelf.callable.lock().clone(); + vm.invoke(&callable, args) } }