32 if (
_execute.load(std::memory_order_acquire))
36 _interval.store(interval, std::memory_order_release);
37 _execute.store(
true, std::memory_order_release);
38 _thd = std::thread([
this, func, userData]() {
39 while (
_execute.load(std::memory_order_acquire))
41 auto start = std::chrono::steady_clock::now();
46 std::this_thread::sleep_until(
start + std::chrono::milliseconds(
_interval.load(std::memory_order_acquire)));