throttle: Minimal destructor fix for Luminous
Get rid of the undefined behavior of destroying condition variables
while they're being waited on.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit
0f52f486ef05edf8bf89e2bbb7b79f1bc1644cfa)
Conflicts:
src/common/Throttle.cc
src/common/Throttle.h
src/test/common/Throttle.cc: in jewel, we don't have perfconter
for throttles, neither do we have backport14.h back then, so we need to
resolve these conflicts, by removing perfcounter related change in
Throttle.cc, and add the make_unique helper for test/common/Throttle.cc,
add scope_guard to Throttle.cc.