1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-05 19:15:58 +03:00

[pzstd] Fix lantent bug in WorkQueue::push()

This commit is contained in:
Nick Terrell
2016-10-13 12:03:02 -07:00
parent baa152e56e
commit 8c6c686d0a
3 changed files with 21 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ class ThreadPool {
explicit ThreadPool(std::size_t numThreads) {
threads_.reserve(numThreads);
for (std::size_t i = 0; i < numThreads; ++i) {
threads_.emplace_back([&] {
threads_.emplace_back([this] {
std::function<void()> task;
while (tasks_.pop(task)) {
task();