ThreadPoolImpl::Impl::BGThreadWrapper() returns void (#5709)

Summary:
there is no need to return void*, as
std:🧵:thread(Func&& f, Args&&... args ) only requires `Func` to
be callable.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5709

Differential Revision: D16832894

fbshipit-source-id: a1e1b876fa8d55589ef5feb5b27f3a435068b747
This commit is contained in:
Kefu Chai 2019-08-16 13:54:23 -07:00 committed by Facebook Github Bot
parent 3a3dc29437
commit 40712df9ab

View File

@ -99,7 +99,7 @@ struct ThreadPoolImpl::Impl {
private:
static void* BGThreadWrapper(void* arg);
static void BGThreadWrapper(void* arg);
bool low_io_priority_;
bool low_cpu_priority_;
@ -275,7 +275,7 @@ struct BGThreadMetadata {
: thread_pool_(thread_pool), thread_id_(thread_id) {}
};
void* ThreadPoolImpl::Impl::BGThreadWrapper(void* arg) {
void ThreadPoolImpl::Impl::BGThreadWrapper(void* arg) {
BGThreadMetadata* meta = reinterpret_cast<BGThreadMetadata*>(arg);
size_t thread_id = meta->thread_id_;
ThreadPoolImpl::Impl* tp = meta->thread_pool_;
@ -298,7 +298,7 @@ void* ThreadPoolImpl::Impl::BGThreadWrapper(void* arg) {
break;
case Env::Priority::TOTAL:
assert(false);
return nullptr;
return;
}
assert(thread_type != ThreadStatus::NUM_THREAD_TYPES);
ThreadStatusUtil::RegisterThread(tp->GetHostEnv(), thread_type);
@ -308,7 +308,7 @@ void* ThreadPoolImpl::Impl::BGThreadWrapper(void* arg) {
#ifdef ROCKSDB_USING_THREAD_STATUS
ThreadStatusUtil::UnregisterThread();
#endif
return nullptr;
return;
}
void ThreadPoolImpl::Impl::SetBackgroundThreadsInternal(int num,