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:
Arthur Sonzogni
2022-02-13 11:11:34 +01:00
committed by GitHub
parent 62747a49b6
commit 9c4218c2a8
14 changed files with 165 additions and 94 deletions

View File

@@ -34,7 +34,7 @@ std::vector<std::vector<ColorInfo>> ColorInfoSorted2D() {
for (int i = 0; i < int(column.size()) - 1; ++i) {
int best_index = i + 1;
int best_distance = 255 * 255 * 3;
for (size_t j = i + 1; j < column.size(); ++j) {
for (int j = i + 1; j < column.size(); ++j) {
int dx = column[i].red - column[j].red;
int dy = column[i].green - column[j].green;
int dz = column[i].blue - column[j].blue;