Add td:🧵:get_id().
This commit is contained in:
parent
f0b4824924
commit
e984706622
@ -72,6 +72,10 @@ class ThreadPthread {
|
|||||||
|
|
||||||
using id = pthread_t;
|
using id = pthread_t;
|
||||||
|
|
||||||
|
id get_id() noexcept {
|
||||||
|
return thread_;
|
||||||
|
}
|
||||||
|
|
||||||
static void send_real_time_signal(id thread_id, int real_time_signal_number);
|
static void send_real_time_signal(id thread_id, int real_time_signal_number);
|
||||||
|
|
||||||
#if TD_HAVE_THREAD_AFFINITY
|
#if TD_HAVE_THREAD_AFFINITY
|
||||||
|
@ -79,6 +79,14 @@ class ThreadStl {
|
|||||||
using id = std::thread::id;
|
using id = std::thread::id;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
id get_id() noexcept {
|
||||||
|
#if TD_WINDOWS
|
||||||
|
return GetThreadId(thread_.native_handle());
|
||||||
|
#else
|
||||||
|
return thread_.get_id();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void send_real_time_signal(id thread_id, int real_time_signal_number) {
|
static void send_real_time_signal(id thread_id, int real_time_signal_number) {
|
||||||
// not supported
|
// not supported
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user