diff options
| author | Dan Engelbrecht <[email protected]> | 2026-03-24 18:50:59 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-24 18:50:59 +0100 |
| commit | b730eebe53d1d6827d4b6c320ccfd80566a629a6 (patch) | |
| tree | d8df23d781b5fb3b1d7bd170fa7d81e2501ab901 /src/zencore | |
| parent | Subprocess Manager (#889) (diff) | |
| download | zen-b730eebe53d1d6827d4b6c320ccfd80566a629a6.tar.xz zen-b730eebe53d1d6827d4b6c320ccfd80566a629a6.zip | |
hub async provision/deprovision/hibernate/wake (#891)
- Improvement: Hub provision, deprovision, hibernate, and wake operations are now async. HTTP requests returns 202 Accepted while the operation completes in the background
- Improvement: Hub returns 202 Accepted (instead of 409 Conflict) when the same async operation is already in progress for a module
- Improvement: Hub returns 200 OK when a requested state transition is already satisfied
Diffstat (limited to 'src/zencore')
| -rw-r--r-- | src/zencore/include/zencore/thread.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/thread.h b/src/zencore/include/zencore/thread.h index d7262324f..56ce5904b 100644 --- a/src/zencore/include/zencore/thread.h +++ b/src/zencore/include/zencore/thread.h @@ -190,6 +190,13 @@ class Latch public: Latch(std::ptrdiff_t Count) : Counter(Count) {} + void Reset(std::ptrdiff_t Count) + { + ZEN_ASSERT(Counter.load() == 0); + Complete.Reset(); + Counter.store(Count); + } + void CountDown() { std::ptrdiff_t Old = Counter.fetch_sub(1); |