Content deleted Content added
Disambiguated: asynchronous → wikt:asynchronous |
|||
Line 258:
# Xlib makes the client synchronous with respect to replies and events:
## the Xlib functions that send requests block until the appropriate replies, if any is expected, are received; in other words, an X Window client not using Xlib can send a request to the server and then do other operations while waiting for the reply, but a client using Xlib can only call an Xlib function that sends the request and wait for the reply, thus blocking the client while waiting for the reply (unless the client starts a new thread before calling the function);
## while the server sends events [[wikt:asynchronous|asynchronous]]ly, Xlib stores events received by the client in a [[Queue (data structure)|queue]]; the client program can only access them by explicitly calling functions of the X11 library; in other words, the client is forced to block or [[busy waiting|busy-wait]] if expecting an event.
# Xlib does not send requests to the server immediately, but stores them in a queue, called the ''output buffer''; the requests in the output buffer are actually sent when:
## the program explicitly requests so by calling a library function such as <code>XFlush</code>;
|