sapling/eden/fs/service/EdenCPUThreadPool.cpp
Chad Austin 2f22a9f534 introduce a type representing the unbounded eden cpu pool
Summary:
Add EdenCPUThreadPool and UnboundedQueueThreadPool types to make it clearer
that it's always okay for prefetch, deferred diff entry, and hg import to
shuttle work back to the main thread pool.

This diff changes no behavior - it just makes some invariants explicit.

Reviewed By: wez, simpkins

Differential Revision: D6504117

fbshipit-source-id: 3400ad55c00b3719ecba31807fd992442f622cd9
2017-12-12 12:35:35 -08:00

24 lines
668 B
C++

/*
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#include "eden/fs/service/EdenCPUThreadPool.h"
#include <gflags/gflags.h>
DEFINE_int32(num_eden_threads, 12, "the number of eden CPU worker threads");
namespace facebook {
namespace eden {
EdenCPUThreadPool::EdenCPUThreadPool()
: UnboundedQueueThreadPool(FLAGS_num_eden_threads, "EdenCPUThread") {}
} // namespace eden
} // namespace facebook