projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Thread Observer
[folly.git]
/
folly
/
wangle
/
concurrent
/
CPUThreadPoolExecutor.cpp
diff --git
a/folly/wangle/concurrent/CPUThreadPoolExecutor.cpp
b/folly/wangle/concurrent/CPUThreadPoolExecutor.cpp
index a03c6151040e240b76ab8f71ced395ff59ba9389..e0ad08c83ce8a76379a147a5a52c0206ed8872d1 100644
(file)
--- a/
folly/wangle/concurrent/CPUThreadPoolExecutor.cpp
+++ b/
folly/wangle/concurrent/CPUThreadPoolExecutor.cpp
@@
-105,6
+105,10
@@
void CPUThreadPoolExecutor::threadRun(std::shared_ptr<Thread> thread) {
auto task = taskQueue_->take();
if (UNLIKELY(task.poison)) {
CHECK(threadsToStop_-- > 0);
+ for (auto& o : observers_) {
+ o->threadStopped(thread.get());
+ }
+
stoppedThreads_.add(thread);
return;
} else {