MCPcopy Create free account
hub / github.com/anthonywilliams/ccia_code_samples / push

Method push

listings/listing_c.1.cpp:30–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 public:
29 template<typename T>
30 void push(T const& msg)
31 {
32 std::lock_guard<std::mutex> lk(m);
33 q.push(std::make_shared<wrapped_message<T> >(msg));
34 c.notify_all();
35 }
36 std::shared_ptr<message_base> wait_and_pop()
37 {
38 std::unique_lock<std::mutex> lk(m);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected