Closed pYtoner closed 3 years ago
At the moment, no, there isn't, but yes, I think this should be possible basically by doing what we currently do in Drop
just in a separate method called something like take
. I'd be happy to review a PR!
I'll start working on it..
Since 0.11.3 the way to do this is with WriteHandle::take
Once we create a writer and reader is there a way to get the underlying data out?
It would be the opposite of
left_right::new_from_empty<T, _>
Something like
left_right::consume_writer<O>(writer: WriteHandle<T, O>) -> T
It would be only safe to do this once all the readers moved on from the current write side. And the readers could still read the read side so we don't need to consume them.
Would something like this be possible?