docs: Document non-blocking behaviour of wl_display_flush()

This commit is contained in:
Kristian Høgsberg 2013-04-02 21:31:02 -04:00
parent 88d873ecb9
commit 858fcbde59

View file

@ -1052,7 +1052,7 @@ wl_display_get_error(struct wl_display *display)
return ret; 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 * \param display The display context object
* \return The number of bytes send on success or -1 on failure * \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 * of bytes sent to the server is returned. On failure, this
* function returns -1 and errno is set appropriately. * 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 * \memberof wl_display
*/ */
WL_EXPORT int WL_EXPORT int