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

Method run

include/dmlc/thread_group.h:614–628  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612 */
613 template<typename OnItemFunction>
614 inline int run(OnItemFunction on_item_function) {
615 int rc = 0;
616 do {
617 ObjectType item;
618 queue_->wait_dequeue(item);
619 if (item == quit_item) {
620 break;
621 }
622 rc = on_item_function(item);
623 if (rc) {
624 break;
625 }
626 } while (true);
627 return rc;
628 }
629
630 private:
631 /*! \brief The blocking queue associated with this thread */

Callers

nothing calls this directly

Calls 1

wait_dequeueMethod · 0.80

Tested by

no test coverage detected