|
@@ -54,6 +54,9 @@ template <class... Ts> overloaded(Ts...)->overloaded<Ts...>;
|
|
|
|
|
|
template <typename... P> class synchronized_callback {
|
|
|
public:
|
|
|
+ synchronized_callback() = default;
|
|
|
+ ~synchronized_callback() { *this = nullptr; }
|
|
|
+
|
|
|
synchronized_callback &operator=(std::function<void(P...)> func) {
|
|
|
std::lock_guard<std::recursive_mutex> lock(mutex);
|
|
|
callback = func;
|