MCPcopy Create free account
hub / github.com/dmlc/dmlc-core / is_current_thread

Method is_current_thread

include/dmlc/thread_group.h:177–180  ·  view source on GitHub ↗

! * \brief Check if this class represents the currently running thread (self) * \return true if the current running thread belongs to this class */

Source from the content-addressed store, hash-verified

175 * \return true if the current running thread belongs to this class
176 */
177 bool is_current_thread() const {
178 ReadLock guard(thread_mutex_);
179 return thread_.load() ? (thread_.load()->get_id() == std::this_thread::get_id()) : false;
180 }
181
182 /*!
183 * \brief Signal to this thread that a thread shutdown/exit is requested.

Callers

nothing calls this directly

Calls 1

get_idMethod · 0.80

Tested by

no test coverage detected