refactor: get rid of extern runner thread id

This commit is contained in:
Steffen Winter
2026-01-16 15:30:50 +01:00
committed by Steffen
parent 5521ba3b4c
commit 084b49e4f7
3 changed files with 6 additions and 6 deletions

View File

@@ -124,6 +124,10 @@ namespace Global {
atomic<bool> reload_conf (false);
}
namespace Runner {
static pthread_t runner_id;
} // namespace Runner
//* Handler for SIGWINCH and general resizing events, does nothing if terminal hasn't been resized unless force=true
void term_resize(bool force) {
static atomic<bool> resizing (false);
@@ -355,7 +359,7 @@ namespace Runner {
atomic<bool> waiting (false);
atomic<bool> redraw (false);
atomic<bool> coreNum_reset (false);
static inline auto set_active(bool value) noexcept {
active.store(value, std::memory_order_relaxed);
active.notify_all();
@@ -408,7 +412,6 @@ namespace Runner {
string empty_bg;
bool pause_output{};
sigset_t mask;
pthread_t runner_id;
pthread_mutex_t mtx;
enum debug_actions {

View File

@@ -76,13 +76,11 @@ namespace Runner {
extern atomic<bool> stopping;
extern atomic<bool> redraw;
extern atomic<bool> coreNum_reset;
extern pthread_t runner_id;
extern bool pause_output;
extern string debug_bg;
void run(const string& box="", bool no_update = false, bool force_redraw = false);
void run(const string& box = "", bool no_update = false, bool force_redraw = false);
void stop();
}
namespace Tools {

View File

@@ -29,7 +29,6 @@ tab-size = 4
#include <cstdint>
#include <filesystem>
#include <limits.h>
#include <pthread.h>
#include <ranges>
#include <regex>
#include <string>