diff options
| author | Stefan Boberg <[email protected]> | 2026-03-20 00:10:22 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2026-03-20 00:10:22 +0100 |
| commit | acbec2de68598fd64179387158d4c808220241cf (patch) | |
| tree | 6e88c2aadd4b428887fec5bca96ed7fa0bf4d97d /src/zencore | |
| parent | Fix HordeClient to use HttpClientAccessToken constructor (diff) | |
| download | zen-sb/compute-auth.tar.xz zen-sb/compute-auth.zip | |
Consolidate action map locks and fix immediate query visibilitysb/compute-auth
Replace three separate RwLocks (m_PendingLock, m_RunningLock,
m_ResultsLock) with a single m_ActionMapLock guarding all three action
maps. This eliminates lock-ordering requirements and prevents actions
from being temporarily absent from all maps during state transitions.
Additionally, insert actions into m_PendingActions immediately during
EnqueueResolvedAction so they are visible to GetActionResult and
FindActionResult right away, without waiting for the scheduler thread
to process the update. Previously, eager clients could get a spurious
404 if they queried before the scheduler's HandleActionUpdates ran.
Also adds debug logging for worker manifest, process launch and exit
on Windows, and ANSI color helper macros for log formatting.
Diffstat (limited to 'src/zencore')
| -rw-r--r-- | src/zencore/include/zencore/logging.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/logging.h b/src/zencore/include/zencore/logging.h index 3427991d2..9923c8531 100644 --- a/src/zencore/include/zencore/logging.h +++ b/src/zencore/include/zencore/logging.h @@ -90,6 +90,26 @@ using zen::ConsoleLog; using zen::ErrorLog; using zen::Log; +//////////////////////////////////////////////////////////////////////// +// Color helpers + +#define ZEN_RED(str) "\033[31m" str "\033[0m" +#define ZEN_GREEN(str) "\033[32m" str "\033[0m" +#define ZEN_YELLOW(str) "\033[33m" str "\033[0m" +#define ZEN_BLUE(str) "\033[34m" str "\033[0m" +#define ZEN_MAGENTA(str) "\033[35m" str "\033[0m" +#define ZEN_CYAN(str) "\033[36m" str "\033[0m" +#define ZEN_WHITE(str) "\033[37m" str "\033[0m" + +#define ZEN_BOLD(str) "\033[1m" str "\033[0m" +#define ZEN_UNDERLINE(str) "\033[4m" str "\033[0m" +#define ZEN_DIM(str) "\033[2m" str "\033[0m" +#define ZEN_ITALIC(str) "\033[3m" str "\033[0m" +#define ZEN_STRIKETHROUGH(str) "\033[9m" str "\033[0m" +#define ZEN_INVERSE(str) "\033[7m" str "\033[0m" + +//////////////////////////////////////////////////////////////////////// + #if ZEN_BUILD_DEBUG # define ZEN_CHECK_FORMAT_STRING(fmtstr, ...) \ while (false) \ |