Concurrency and multi-threading

A GUI must remain responsive to user input at all times. While this is largely an aesthetic consideration, it is also possible that the operating system may monitor applications and force unresponsive user interfaces to quit. Effective event handling is what makes this possible, and this is the core paradigm for a GUI. The event handler is responsible for responding to user events (such as mouse click, finger tap, and keyboard entry), system events (such as file changes, network availability, and application state), and also for updating the user interface (such as rendering content, changing interface state, and more). Anything that stops this work from occurring could cause the application to stop responding. In most graphical toolkits, there is a single thread (a task that manages a set of concurrent operations) that is responsible for the event handling and graphical updates. In some systems, this is the main thread (where an application launches from), and in others it is a separate thread or process. It is important to know the semantics of the system you are using, as it is commonly required that only the graphical or event handling thread can make changes to the user interface.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.10.45