thread: getcpu
This commit is contained in:
parent
8743dfc155
commit
06f084d4ba
@ -20,6 +20,10 @@ UVW_INLINE thread::type thread::self() noexcept {
|
||||
return uv_thread_self();
|
||||
}
|
||||
|
||||
UVW_INLINE int thread::getcpu() noexcept {
|
||||
return uv_thread_getcpu();
|
||||
}
|
||||
|
||||
UVW_INLINE bool thread::equal(const thread &tl, const thread &tr) noexcept {
|
||||
return !(0 == uv_thread_equal(tl.raw(), tr.raw()));
|
||||
}
|
||||
|
||||
@ -60,6 +60,12 @@ public:
|
||||
*/
|
||||
static type self() noexcept;
|
||||
|
||||
/**
|
||||
* @brief Gets the CPU number on which the calling thread is running.
|
||||
* @return The CPU number on which the calling thread is running.
|
||||
*/
|
||||
static int getcpu() noexcept;
|
||||
|
||||
/**
|
||||
* @brief Compares thread by means of their identifiers.
|
||||
* @param tl A valid instance of a thread.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user