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

Method Thread

include/dmlc/thread_group.h:112–121  ·  view source on GitHub ↗

! * \brief Constructor * \param threadName User-defined name of the thread. must be unique per ThreadGroup * \param owner The ThreadGroup object managing the lifecycle of this thread * \param thrd Optionally-assigned std::thread object associated with this Thread class */

Source from the content-addressed store, hash-verified

110 * \param thrd Optionally-assigned std::thread object associated with this Thread class
111 */
112 Thread(std::string threadName, ThreadGroup *owner, std::thread *thrd = nullptr)
113 : name_(std::move(threadName))
114 , thread_(thrd)
115 , ready_event_(std::make_shared<ManualEvent>())
116 , start_event_(std::make_shared<ManualEvent>())
117 , owner_(owner)
118 , shutdown_requested_(false)
119 , auto_remove_(false) {
120 CHECK_NOTNULL(owner);
121 }
122
123 /*!
124 * \brief Destructor with cleanup

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected