MCPcopy Create free account
hub / github.com/ElementsProject/lightning / poke_reader

Function poke_reader

ccan/ccan/io/benchmarks/run-loop.c:36–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36static struct io_plan poke_reader(struct io_conn *conn, struct buffer *buf)
37{
38 assert(conn == buf->writer);
39 /* You read. */
40 io_wake(buf->reader,
41 io_read(&buf->buf, sizeof(buf->buf), poke_writer, buf));
42
43 if (++buf->iters == NUM_ITERS)
44 return io_close();
45
46 /* I'll wait until you tell me to write. */
47 return io_idle();
48}
49
50int main(void)
51{

Callers

nothing calls this directly

Calls 2

io_wakeFunction · 0.85
io_closeFunction · 0.85

Tested by

no test coverage detected