~sircmpwn/hare-ev

7de2b827e5e680e315697b97be142aebe71ec58f — Drew DeVault 2 months ago 554723c master
ev: improve documentation of ev::do

And make it clear that the dispatch handler is only called once.

Signed-off-by: Drew DeVault <sir@cmpwn.com>
1 files changed, 5 insertions(+), 2 deletions(-)

M ev/+linux/loop.ha
M ev/+linux/loop.ha => ev/+linux/loop.ha +5 -2
@@ 61,9 61,12 @@ export fn loop_file(loop: *loop) io::file = {
	return loop.fd;
};

// Registers a callback to be invoked before the event loop dispatches pending
// I/O requests. The callback may schedule additional I/O requests to be
// Registers a callback to be invoked before the next call to [[dispatch]]
// processes requests. The callback may schedule additional I/O requests to be
// processed in this batch.
//
// Dispatch callbacks are only called once. If you wish to schedule another
// dispatch callback after the first, call [[do]] again.
export fn do(
	loop: *loop,
	cb: *dispatchcb,