danielealbano / cachegrand

cachegrand - a modern data ingestion, processing and serving platform built for today's hardware
BSD 3-Clause "New" or "Revised" License
975 stars 34 forks source link

Use volatile for hastable_key_data_t and hashtable_key_size_t #346

Closed danielealbano closed 1 year ago

danielealbano commented 1 year ago

To avoid that the compiler carry out any distruptive optimization for the hashtable mpmc algorithm implemented, use volatile for hashtable_key_data_t and hashtable_key_size_t in the hashtable to hold the key and the length of the key.