Open aakoshh opened 3 years ago
Ah, sorry I just saw now in https://github.com/Marthog/rust-stm/issues/15 that you have a different repo for data structures, or at least you didn't want them in stm-core
, which makes sense. I was looking at some Scala implementations and they all had some collections; I thought queues are an especially useful integration pattern for things like a thread that persists changes to the database, so it would be good to have them available.
Implements
TChan
,TQueue
andTBQueue
from the book, plus aTVecDequeue
to see the effect of having a single data structure for reads and writes. All of them implement theTQueueLike
trait with aread
andwrite
method topop
andpush
from the queue.The PR has benchmarks for them: