================
@@ -119,7 +130,25 @@ class ThreadPoolExecutor : public Executor {
       auto Task = std::move(WorkStack.back());
       WorkStack.pop_back();
       Lock.unlock();
-      Task();
+
+      if (TheJobserver) {
+        JobSlot Slot = TheJobserver->tryAcquire();
+        if (Slot.isValid()) {
+          auto Releaser =
+              make_scope_exit([&] { TheJobserver->release(std::move(Slot)); });
----------------
yxsamliu wrote:

will do

https://github.com/llvm/llvm-project/pull/145131
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to