blob: 1ecf1fe9bd63ac3be05d1073f22e2652b6094560 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "thread_id.h"
#include <util/system/thread.h>
namespace NYT {
////////////////////////////////////////////////////////////////////////////////
YT_THREAD_LOCAL(TSequentialThreadId) CachedSequentialThreadId = InvalidSequentialThreadId;
std::atomic<TSequentialThreadId> SequentialThreadIdGenerator = InvalidSequentialThreadId;
TSystemThreadId GetSystemThreadId()
{
static_assert(std::is_same_v<TSystemThreadId, ::TThread::TId>);
return ::TThread::CurrentThreadNumericId();
}
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT::NThreading
|