Multiple producers - one consumer. Producers write tagged(uint64) values, consumer reads it one by one. Consumer must read the last value with the same tag.
Now i have simple lock-free queue. Thus, consumer must check the entire queue to get the last added value with the same tag.
I want to replace queue with hashtable and write new values instead of old with the same tag. How should reader get it? Should it remove the last value from hash-table or i should reduce input queue to achieve just one tag with hashtable buffer or ...?
Also, advise me pls C++ libs, that have lock-free hashtable implementation, coz boost doesnt.