Summary: Why do we assert here? This doesn't seem like user friendly thing to do :)

Test Plan: none

Reviewers: sdong, yhchiang, rven

Reviewed By: rven

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D30027
This commit is contained in:
Igor Canadi 2014-12-09 10:22:07 -08:00
parent 046ba7d47c
commit cb82d7b081

View File

@ -1694,11 +1694,10 @@ class PosixEnv : public Env {
}
if (num > total_threads_limit_ ||
(num < total_threads_limit_ && allow_reduce)) {
total_threads_limit_ = num;
total_threads_limit_ = std::max(1, num);
WakeUpAllThreads();
StartBGThreads();
}
assert(total_threads_limit_ > 0);
PthreadCall("unlock", pthread_mutex_unlock(&mu_));
}