MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Run

Method Run

src/httpserver.cpp:100–115  ·  view source on GitHub ↗

Thread function */

Source from the content-addressed store, hash-verified

98 }
99 /** Thread function */
100 void Run()
101 {
102 while (true) {
103 std::unique_ptr<WorkItem> i;
104 {
105 std::unique_lock<std::mutex> lock(cs);
106 while (running && queue.empty())
107 cond.wait(lock);
108 if (!running)
109 break;
110 i = std::move(queue.front());
111 queue.pop_front();
112 }
113 (*i)();
114 }
115 }
116 /** Interrupt and exit loops */
117 void Interrupt()
118 {

Callers 1

HTTPWorkQueueRunFunction · 0.45

Calls 2

waitMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected