MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / enqueue

Method enqueue

source/executors/manual_executor.cpp:10–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8}
9
10void manual_executor::enqueue(concurrencpp::task task) {
11 std::unique_lock<decltype(m_lock)> lock(m_lock);
12 if (m_abort) {
13 details::throw_runtime_shutdown_exception(name);
14 }
15
16 m_tasks.emplace_back(std::move(task));
17 lock.unlock();
18
19 m_condition.notify_all();
20}
21
22void manual_executor::enqueue(std::span<concurrencpp::task> tasks) {
23 std::unique_lock<decltype(m_lock)> lock(m_lock);

Callers 3

do_postFunction · 0.45
do_bulk_postFunction · 0.45
do_bulk_submitFunction · 0.45

Calls 4

unlockMethod · 0.80
notify_allMethod · 0.80
endMethod · 0.80
beginMethod · 0.80

Tested by

no test coverage detected