mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 10:02:01 +00:00
Minor changes
This commit is contained in:
parent
a90c2ec90d
commit
50202c1b0a
@ -30,10 +30,8 @@ static thread_local char thread_name[THREAD_NAME_SIZE]{};
|
|||||||
|
|
||||||
void setThreadName(const char * name)
|
void setThreadName(const char * name)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
|
||||||
if (strlen(name) > THREAD_NAME_SIZE - 1)
|
if (strlen(name) > THREAD_NAME_SIZE - 1)
|
||||||
throw DB::Exception(DB::ErrorCodes::PTHREAD_ERROR, "Thread name cannot be longer than 15 bytes");
|
throw DB::Exception(DB::ErrorCodes::PTHREAD_ERROR, "Thread name cannot be longer than 15 bytes");
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(OS_FREEBSD)
|
#if defined(OS_FREEBSD)
|
||||||
pthread_set_name_np(pthread_self(), name);
|
pthread_set_name_np(pthread_self(), name);
|
||||||
|
Loading…
Reference in New Issue
Block a user