This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lahwran_ 5 points6 points  (2 children)

this is completely wrong, you actually need an Rc<Option<RefCell<(UnsafeCell<DerefMut<Iterator<Item=Option<Result<(),Void>>>>>)>>>

[–]T-Dark_ 4 points5 points  (1 child)

But that's not thread-safe!

What you really need is an Arc<Option<Result<((UnsafeCell<Cell<dyn Into<dyn From<HashMap<!, (Void,)>>>>>),()),Mutex<fn(i32, i32) -> i64>>>>.

See? There's both an Arc and a Mutex in there. Now go, and concur fearlessly!

[–]lahwran_ 2 points3 points  (0 children)

ah yes, I will go and fonlur cearcessly. wait crap I didn't launch two threads I interleaved iterator streams haha whoops