diff options
| author | Stefan Boberg <[email protected]> | 2023-12-19 12:06:13 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-12-19 12:06:13 +0100 |
| commit | 519d942d809e740a3b1fe5a1f6a57a4cfe43408b (patch) | |
| tree | 9b3c084e21bb7fd5e6bb3335e890647062d0703b /src/zencore/jobqueue.cpp | |
| parent | added mimalloc_hooks (diff) | |
| parent | ensure we can build without trace (#619) (diff) | |
| download | zen-273-integrated-memory-tracking.tar.xz zen-273-integrated-memory-tracking.zip | |
Merge branch 'main' into 273-integrated-memory-tracking273-integrated-memory-tracking
Diffstat (limited to 'src/zencore/jobqueue.cpp')
| -rw-r--r-- | src/zencore/jobqueue.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/zencore/jobqueue.cpp b/src/zencore/jobqueue.cpp index 1755b9fe9..4bcc5c885 100644 --- a/src/zencore/jobqueue.cpp +++ b/src/zencore/jobqueue.cpp @@ -422,8 +422,10 @@ TEST_CASE("JobQueue") { JobsLatch.AddCount(1); Pool.ScheduleWork([&Queue, &JobsLatch, I]() { - auto _ = MakeGuard([&JobsLatch]() { JobsLatch.CountDown(); }); - auto Id = Queue->QueueJob(fmt::format("busy {}", I), [&](JobContext& Context) { + auto _ = MakeGuard([&JobsLatch]() { JobsLatch.CountDown(); }); + JobsLatch.AddCount(1); + auto Id = Queue->QueueJob(fmt::format("busy {}", I), [&JobsLatch, I](JobContext& Context) { + auto $ = MakeGuard([&JobsLatch]() { JobsLatch.CountDown(); }); if (Context.IsCancelled()) { return; @@ -523,7 +525,6 @@ TEST_CASE("JobQueue") } JobsLatch.Wait(); } - #endif } // namespace zen |