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

Function thr

example/spsc.cpp:121–127  ·  view source on GitHub ↗

Dummy thread blasting out values.

Source from the content-addressed store, hash-verified

119
120// Dummy thread blasting out values.
121cobalt::thread thr(awaitable_spsc_queue<int> & q)
122{
123 for (int i = 0; i <= 100000000; i++)
124 co_await q.write(i);
125
126 co_await q.write(-1);
127}
128
129cobalt::main co_main(int argc, char * argv[])
130{

Callers 1

co_mainFunction · 0.70

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected