Relax consumer side to make MPSC from MPMC

79 views
Skip to first unread message

Hải Nguyễn

unread,
Jun 2, 2016, 5:28:18 AM6/2/16
to Folly: the Facebook Open-source LibrarY
Hi,
I tried to utilize MPMC in my MPSC test by relaxing read operation. In tryObtainReadyPopTicket() function, atomic popTicket_ is used to make sure multiple consumer will not conflict each other.
Can I change this popTicket_ from atomic to normal uint64_t to transform MPMC to MPSC if I have only one thread to read data from that queue?
The same thing with SPMC situation: change pushTicket_ from atomic to normal uint64_t?
Thank.

Reply all
Reply to author
Forward
0 new messages