crossbeam icon indicating copy to clipboard operation
crossbeam copied to clipboard

push_mut and pop_mut for queues

Open orlp opened this issue 10 months ago • 2 comments

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).

orlp avatar Feb 13 '25 10:02 orlp

Seems reasonable to me. I would accept a PR to add this.

taiki-e avatar Feb 16 '25 05:02 taiki-e

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.

jafar75 avatar Apr 11 '25 17:04 jafar75