Fix #434
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:
parent
046ba7d47c
commit
cb82d7b081
@ -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_));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user