33 void setQueue(
ActionQueue* queue) { _queue = queue; }
35 void clearQueue() { _queue =
nullptr; }
37 bool isManaged()
const {
return _queue !=
nullptr; }
39 void execute(Action action) {
41 _queue->enqueue(
this,
"", std::move(action));
45 }
catch (std::exception& e) {
51 void execute(std::string_view key, Action action) {
53 _queue->enqueue(
this, key, std::move(action));
57 }
catch (std::exception& e) {
63 static void globalExecute(Action action) {
64 if (ActionQueue::getGlobalQueue()) {
65 ActionQueue::getGlobalQueue()->enqueue(std::move(action));
69 }
catch (std::exception& e) {