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

Method Run

src/rpc/core/httpserver.cpp:118–130  ·  view source on GitHub ↗

Thread function */

Source from the content-addressed store, hash-verified

116 }
117 /** Thread function */
118 void Run() {
119 while (true) {
120 std::unique_ptr<WorkItem> i;
121 {
122 STD_WAIT_LOCK(cs, lock);
123 while (running && queue.empty()) cond.wait(lock);
124 if (!running) break;
125 i = std::move(queue.front());
126 queue.pop_front();
127 }
128 (*i)();
129 }
130 }
131 /** Interrupt and exit loops */
132 void Interrupt() {
133 STD_LOCK(cs);

Callers 1

HTTPWorkQueueRunFunction · 0.45

Calls 2

waitMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected