|
|
|
@ -1667,14 +1667,18 @@ class PosixEnv : public Env { |
|
|
|
|
BGThreadMetadata* meta = reinterpret_cast<BGThreadMetadata*>(arg); |
|
|
|
|
size_t thread_id = meta->thread_id_; |
|
|
|
|
ThreadPool* tp = meta->thread_pool_; |
|
|
|
|
#if ROCKSDB_USING_THREAD_STATUS |
|
|
|
|
// for thread-status
|
|
|
|
|
thread_local_status.SetThreadType( |
|
|
|
|
(tp->GetThreadPriority() == Env::Priority::HIGH ? |
|
|
|
|
ThreadStatus::ThreadType::ROCKSDB_HIGH_PRIORITY : |
|
|
|
|
ThreadStatus::ThreadType::ROCKSDB_LOW_PRIORITY)); |
|
|
|
|
#endif |
|
|
|
|
delete meta; |
|
|
|
|
tp->BGThread(thread_id); |
|
|
|
|
#if ROCKSDB_USING_THREAD_STATUS |
|
|
|
|
thread_local_status.UnregisterThread(); |
|
|
|
|
#endif |
|
|
|
|
return nullptr; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|