MCPcopy Create free account
hub / github.com/ElementsProject/elements / Run

Method Run

src/httpserver.cpp:99–114  ·  view source on GitHub ↗

Thread function */

Source from the content-addressed store, hash-verified

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

Callers 1

HTTPWorkQueueRunFunction · 0.45

Calls 2

waitMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected