schets / multiqueue

A fast mpmc queue with broadcast capabilities
MIT License
201 stars 29 forks source link

Channels not sync? #29

Closed NeoLegends closed 5 years ago

NeoLegends commented 5 years ago

Seems like the channel primitives aren't Sync, is this desired?

fmckeogh commented 5 years ago

I think I need this as well to use a queue with tokio, unless I'm misunderstanding something.

schets commented 5 years ago

I haven't looked at this code in a while, but as designed now the Sender/Receiver structs aren't sync since they maintain local state which is only occasionally refreshed to avoid cache problems on shared variables.

One could add sync version of these which don't have this restriction however, but I don't have much time anymore for this project.