We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb30d0f commit f740845Copy full SHA for f740845
vm/src/stdlib/thread.rs
@@ -36,9 +36,8 @@ fn get_ident(_vm: &VirtualMachine) -> u32 {
36
}
37
38
fn allocate_lock(vm: &VirtualMachine) -> PyResult {
39
- let module = vm.import("_thread", &vm.ctx.new_tuple(vec![]), 0)?;
40
- let lock_class = vm.get_attribute(module.clone(), "RLock")?;
41
- vm.invoke(lock_class, vec![])
+ let lock_class = vm.class("_thread", "RLock");
+ vm.invoke(lock_class.into_object(), vec![])
42
43
44
pub fn make_module(vm: &VirtualMachine) -> PyObjectRef {
0 commit comments