MCPcopy Create free account
hub / github.com/alibaba/async_simple / push

Method push

async_simple/util/Queue.h:40–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38requires std::is_move_assignable_v<T> class Queue {
39public:
40 void push(T &&item) {
41 {
42 std::scoped_lock guard(_mutex);
43 _queue.push(std::move(item));
44 }
45 _cond.notify_one();
46 }
47
48 bool try_push(const T &item) {
49 {

Callers 2

scheduleByIdMethod · 0.45
try_pushMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected