From 7f10528d80491e95a0dc4eab25bb2b0ef4e4f735 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 30 Dec 2014 20:49:08 +0100 Subject: [PATCH] main.c:uev_run() - Document mysterious flags parameter. Signed-off-by: Joachim Nilsson --- main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index d4b5ff3..a719ac3 100644 --- a/main.c +++ b/main.c @@ -165,7 +165,14 @@ int uev_exit(uev_ctx_t *ctx) * @param ctx A valid libuev context * @param flags A mask of %UEV_ONCE and %UEV_NONBLOCK, or zero * - * @return POSIX OK(0) upon successful termination of the event loop, or non-zero on error. + * With @flags set to %UEV_ONCE the event loop returns after the first + * event has been served, useful for instance to set a timeout on a file + * descriptor. If @flags also has the %UEV_NONBLOCK flag set the event + * loop will return immediately if no event is pending, useful when run + * inside another event loop. + * + * @return POSIX OK(0) upon successful termination of the event loop, or + * non-zero on error. */ int uev_run(uev_ctx_t *ctx, int flags) {