MCPcopy Create free account
hub / github.com/ad-freiburg/qlever / makePush

Function makePush

test/ThreadSafeQueueTest.cpp:27–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25// to avoid deadlocks, see `ThreadSafeQueue.h` for details.
26template <typename Queue>
27auto makePush(Queue& queue) {
28 return [&queue](size_t i) {
29 if constexpr (ad_utility::similarToInstantiation<Queue, ThreadSafeQueue>) {
30 return queue.push(i);
31 } else {
32 return queue.push(i, i);
33 }
34 };
35}
36
37// Similar to `makePush` above, but the returned lambda doesn't push directly to
38// the queue, but simply returns a value that can then be pushed to the queue.

Callers 1

TESTFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected