[platform] Change default platform max thread pool size 4 -> 8
BUG= Review URL: https://codereview.chromium.org/1782833006 Cr-Commit-Position: refs/heads/master@{#34711}
This commit is contained in:
parent
c0aa9054ce
commit
ddc0f99820
@ -29,9 +29,7 @@ bool PumpMessageLoop(v8::Platform* platform, v8::Isolate* isolate) {
|
||||
return reinterpret_cast<DefaultPlatform*>(platform)->PumpMessageLoop(isolate);
|
||||
}
|
||||
|
||||
|
||||
const int DefaultPlatform::kMaxThreadPoolSize = 4;
|
||||
|
||||
const int DefaultPlatform::kMaxThreadPoolSize = 8;
|
||||
|
||||
DefaultPlatform::DefaultPlatform()
|
||||
: initialized_(false), thread_pool_size_(0) {}
|
||||
@ -66,7 +64,7 @@ void DefaultPlatform::SetThreadPoolSize(int thread_pool_size) {
|
||||
base::LockGuard<base::Mutex> guard(&lock_);
|
||||
DCHECK(thread_pool_size >= 0);
|
||||
if (thread_pool_size < 1) {
|
||||
thread_pool_size = base::SysInfo::NumberOfProcessors();
|
||||
thread_pool_size = base::SysInfo::NumberOfProcessors() - 1;
|
||||
}
|
||||
thread_pool_size_ =
|
||||
std::max(std::min(thread_pool_size, kMaxThreadPoolSize), 1);
|
||||
|
Loading…
Reference in New Issue
Block a user