There was a serious bug with scheduler, related to locking.
diff --git a/scheduler/periodic-task.cc b/scheduler/periodic-task.cc
index b8fd3a7..32bae6a 100644
--- a/scheduler/periodic-task.cc
+++ b/scheduler/periodic-task.cc
@@ -22,9 +22,10 @@
 #include "periodic-task.h"
 #include <utility>
 
-PeriodicTask::PeriodicTask(const Callback &callback, const Tag &tag, const SchedulerPtr &scheduler, const IntervalGeneratorPtr &generator)
-             : Task(callback, tag, scheduler)
-             , m_generator(generator)
+PeriodicTask::PeriodicTask(const Callback &callback, const Tag &tag, const SchedulerPtr &scheduler,
+                           IntervalGeneratorPtr generator)
+  : Task(callback, tag, scheduler)
+  , m_generator(generator)
 {
 }