Closed
Description
Many iterators use *
internally, for performance. This means they don't automatically implement Send
or Sync
, but many/most can.
Based on the regexp, \bIterator for
, the following (non-compiler/non-test) files have Iterator
implementations. We should look through them to find raw pointers etc. and ensure that they implement Send
/Sync
if there are such pointers. We can do it progressively, comment below if you feel like taking some files:
- liballoc/boxed.rs
- libcollections @edwardw Send/Sync audit for libcollections #22715
- /binary_heap.rs
- /bit.rs
- /btree/map.rs
- /btree/node.rs
- /btree/set.rs
- /enum_set.rs
- /linked_list.rs
- /slice.rs
- /str.rs
- /vec.rs
- /vec_deque.rs
- /vec_map.rs
- libcore/char.rs @Nashenas88 Added test for Sync/Send on iterators within char. #26041
- libcore/iter.rs @Nashenas88 Adding Iterator Sync/Send tests for libcore/iter.rs #26126
- libcore/option.rs
- libcore/result.rs
- libcore/slice.rs
- libcore/str/mod.rs
- libfmt_macros/lib.rs
- librand/lib.rs
- libserialize/json.rs
- libstd/ascii.rs
- libstd/collections/hash/map.rs @GuillaumeGomez Send sync implementation on iterators #27615
- libstd/collections/hash/set.rs @GuillaumeGomez Send sync implementation on iterators #27615
- libstd/collections/hash/table.rs @GuillaumeGomez Send sync implementation on iterators #27615
- libstd/env.rs
- libstd/fs.rs
- libstd/io/mod.rs
- libstd/net/mod.rs
- libstd/net/tcp.rs
- libstd/path.rs
- libstd/sync/mpsc/mod.rs
- libstd/sync/mpsc/select.rs
- libstd/sys/common/net.rs
- libstd/sys/common/wtf8.rs
- libstd/sys/unix/fs2.rs
- libstd/sys/unix/os.rs
- libstd/sys/windows/fs2.rs
- libstd/sys/windows/os.rs
- libunicode/u_str.rs
The &mut self
of Iterator
means that almost all iterators will be safe to implement Send
and Sync
.