mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-22 20:58:10 +08:00
Support SIGTSTP and task posting. (#331)
- Add support for SIGTSTP: https://github.com/ArthurSonzogni/FTXUI/issues/330 This - Add support for task posting. This allows folks to defer function execution, and execute it directly below the main loop. The task are executed in a FIFO order.
This commit is contained in:
12
include/ftxui/component/task.hpp
Normal file
12
include/ftxui/component/task.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include <functional>
|
||||
#include <variant>
|
||||
#include "ftxui/component/event.hpp"
|
||||
|
||||
namespace ftxui {
|
||||
using Closure = std::function<void()>;
|
||||
using Task = std::variant<Event, Closure>;
|
||||
} // namespace ftxui
|
||||
|
||||
// Copyright 2022 Arthur Sonzogni. All rights reserved.
|
||||
// Use of this source code is governed by the MIT license that can be found in
|
||||
// the LICENSE file.
|
Reference in New Issue
Block a user