MCPcopy Create free account
hub / github.com/celtera/libremidi / channel

Class channel

examples/coroutines.cpp:18–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace libremidi
17{
18struct channel
19{
20 cobalt::channel<libremidi::message>& impl;
21 void operator()(const libremidi::message& message)
22 {
23 cobalt::spawn(impl.get_executor(), task(message), asio::detached);
24 }
25
26 cobalt::task<void> task(libremidi::message message) { co_await impl.write(std::move(message)); }
27};
28}
29
30cobalt::main co_main(int argc, char** argv)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected