diff --git a/cpp/include/DataStorm/InternalT.h b/cpp/include/DataStorm/InternalT.h index e0058ddc991..d0a63e4b346 100644 --- a/cpp/include/DataStorm/InternalT.h +++ b/cpp/include/DataStorm/InternalT.h @@ -437,20 +437,18 @@ namespace DataStormI const std::string& getName() const final { return _name; } - template void init(const std::string& name, FF&& lambda) + template void init(std::string name, FF lambda) { - std::unique_lock lock(_mutex); if (!_lambda) { - _name = name; - _lambda = std::forward(lambda); + _name = std::move(name); + _lambda = std::move(lambda); } } using BaseClassType = Filter; private: - std::mutex _mutex; std::string _name; std::function().get())>::type&)> _lambda; };