crossbeam
crossbeam copied to clipboard
push_mut and pop_mut for queues
It would be nice if you could avoid the extra cost of atomic operations + the extra checks done for the lock-free algorithms when you have a mutable reference to the queue (for example during single-threaded initialization of a queue which is then passed off to workers).
Seems reasonable to me. I would accept a PR to add this.
Hi,
@taiki-e I was wondering if it’s okay to submit separate PRs for each queue type (i.e., one for ArrayQueue, another later for SegQueue)? or both of them must be in one PR? I can send PR for array_queue and after that, I will try to provide one for seg_queue too.