! * \brief Check if this class represents the currently running thread (self) * \return true if the current running thread belongs to this class */
| 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. |