Immediate execution

Immediate execution functions process commands immediately.

Some API functions, although categorized as immediate execution, may block for some period of time. The execution of the command is immediate, but the API function may need to communicate with Screen. This means that the client application will be blocked until this communication is complete and the required command to execute the API function is executed.

For example, both screen_create_context() and screen_get_event() are immediate execution types. Both API functions need to communicate with Screen. The screen_create_context() function normally returns in a timely manner when a connection to the services is established. Conversely, screen_get_event() may block for long periods of time if the event queue is empty and a large or infinite timeout is specified.

Immediate execution functions neither cause the contents on a display to change nor flush any queued commands. Any previously queued commands for batch processing remain on the client side after you call immediate execution API functions—even if the immediate execution requires communication with Screen.

The return value from immediate execution functions indicates whether or not the execution of the API function was successful.