MCPcopy Create free account
hub / github.com/boostorg/asio / execute_next

Method execute_next

example/cpp11/executors/fork_join.cpp:72–81  ·  view source on GitHub ↗

Execute the next function from the queue, if any. Returns true if a function was executed, and false if the queue was empty.

Source from the content-addressed store, hash-verified

70 // Execute the next function from the queue, if any. Returns true if a
71 // function was executed, and false if the queue was empty.
72 bool execute_next(std::unique_lock<std::mutex>& lock)
73 {
74 if (queue_.empty())
75 return false;
76 auto p(queue_.front());
77 queue_.pop();
78 lock.unlock();
79 execute(lock, p);
80 return true;
81 }
82
83 // Execute a function and decrement the outstanding work.
84 void execute(std::unique_lock<std::mutex>& lock,

Callers 1

joinMethod · 0.45

Calls 5

frontMethod · 0.80
executeFunction · 0.50
emptyMethod · 0.45
popMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected