mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Set background thread name
This commit is contained in:
@@ -1364,6 +1364,11 @@ class PosixEnv : public Env {
|
||||
}
|
||||
|
||||
static void* BGThreadWrapper(void* arg) {
|
||||
#if (__GLIBC__ * 1000 + __GLIBC_MINOR__) >= 2012
|
||||
pthread_setname_np (pthread_self(), "rocksdb:bg");
|
||||
#else
|
||||
prctl (PR_SET_NAME, "rocksdb:bg", 0, 0, 0);
|
||||
#endif
|
||||
reinterpret_cast<ThreadPool*>(arg)->BGThread();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user