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

Method ScopedThread

include/dmlc/threadediter.h:38–43  ·  view source on GitHub ↗

! * \brief constructor * \param thread thread to manage */

Source from the content-addressed store, hash-verified

36 * \param thread thread to manage
37 */
38 explicit ScopedThread(std::thread thread)
39 : thread_(std::move(thread)) {
40 if (!thread_.joinable()) {
41 throw std::logic_error("No thread");
42 }
43 }
44 // destructor: join upon destruction
45 virtual ~ScopedThread() {
46 thread_.join();

Callers

nothing calls this directly

Calls 1

joinableMethod · 0.80

Tested by

no test coverage detected