Skip to content

Commit c4ab76c

Browse files
committed
Mark PyMap as ThreadSafe
1 parent ca24283 commit c4ab76c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

vm/src/obj/objmap.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::objiter;
22
use super::objtype::PyClassRef;
33
use crate::function::Args;
4-
use crate::pyobject::{PyClassImpl, PyContext, PyObjectRef, PyRef, PyResult, PyValue};
4+
use crate::pyobject::{PyClassImpl, PyContext, PyObjectRef, PyRef, PyResult, PyValue, ThreadSafe};
55
use crate::vm::VirtualMachine;
66

77
/// map(func, *iterables) --> map object
@@ -15,6 +15,7 @@ pub struct PyMap {
1515
iterators: Vec<PyObjectRef>,
1616
}
1717
type PyMapRef = PyRef<PyMap>;
18+
impl ThreadSafe for PyMap {}
1819

1920
impl PyValue for PyMap {
2021
fn class(vm: &VirtualMachine) -> PyClassRef {

0 commit comments

Comments
 (0)