5 ms·
Queues are my advice. The locking is all in the queue operations. Everybody else just takes and posts work items to the queue. Can even use lockless queues.
by JoeAltmaier 7y ago
Queues are my advice. The locking is all in the queue operations. Everybody else just takes and posts work items to the queue. Can even use lockless queues.
- gpderetta 7y agohow would you implement, say, a concurrent hash map with queues?
- JoeAltmaier 7y agoPost service requests to the hashmap queue, get the response on your queue. But more likely a hashmap is too fine a granularity for queues. If a hashmap can be owned by one process, that would perform better.