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

Method ~Thread

include/dmlc/thread_group.h:126–141  ·  view source on GitHub ↗

! * \brief Destructor with cleanup */

Source from the content-addressed store, hash-verified

124 * \brief Destructor with cleanup
125 */
126 virtual ~Thread() {
127 const bool self_delete = is_current_thread();
128 if (!self_delete) {
129 request_shutdown();
130 internal_join(true);
131 }
132 WriteLock guard(thread_mutex_);
133 if (thread_.load()) {
134 std::thread *thrd = thread_.load();
135 thread_ = nullptr;
136 if (self_delete) {
137 thrd->detach();
138 }
139 delete thrd;
140 }
141 }
142
143 /*!
144 * \brief Name of the thread

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected