If a given instance of RNoodle is using atomic types, then make sure to disable the mutex locking mechanism by making RNoodle::lock() do nothing (i.e. don't set the mgr reference parameter to a unique_lock instance).
See class Noodle at bf862d81c47cac709563f119133a0ed60d13225f for the way we were doing this when everything was an int.
Remember to use the atomic load and store functions in RNoodle::push, RNoodle::pop, RNoodle::peek as appropriate.
Do this with template specialization.
If a given instance of
RNoodle
is using atomic types, then make sure to disable the mutex locking mechanism by makingRNoodle::lock()
do nothing (i.e. don't set themgr
reference parameter to aunique_lock
instance).See
class Noodle
at bf862d81c47cac709563f119133a0ed60d13225f for the way we were doing this when everything was anint
.Remember to use the atomic
load
andstore
functions inRNoodle::push
,RNoodle::pop
,RNoodle::peek
as appropriate.