blob: a1971dd0dd8d141f25490704ceb8b9e970260a19 (
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_DEFINE_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
|