From 858fcbde59cfd2b42644c43bf481ffd70b30d5be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 2 Apr 2013 21:31:02 -0400 Subject: [PATCH] docs: Document non-blocking behaviour of wl_display_flush() --- src/wayland-client.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 0873835a..ada4d5e3 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -1052,7 +1052,7 @@ wl_display_get_error(struct wl_display *display) return ret; } -/** Send all buffered request on the display to the server +/** Send all buffered requests on the display to the server * * \param display The display context object * \return The number of bytes send on success or -1 on failure @@ -1062,6 +1062,11 @@ wl_display_get_error(struct wl_display *display) * of bytes sent to the server is returned. On failure, this * function returns -1 and errno is set appropriately. * + * wl_display_flush() never blocks. It will write as much data as + * possible, but if all data could not be written, errno will be set + * to EAGAIN and -1 returned. In that case, use poll on the display + * file descriptor to wait for it to become writable again. + * * \memberof wl_display */ WL_EXPORT int