MCPcopy Create free account
hub / github.com/boostorg/cobalt / co_main

Function co_main

example/channel.cpp:24–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24cobalt::main co_main(int argc, char * argv[])
25{
26 cobalt::channel<int> c;
27
28 auto p = producer(c);
29 while (c.is_open())
30 std::cout << co_await c.read() << std::endl;
31
32 co_await p;
33 co_return 0;
34}
35// end::channel_example[]

Callers

nothing calls this directly

Calls 3

producerFunction · 0.85
is_openMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected