16 Graphical User Interfaces

GRAPHICAL USER INTERFACES (GUIs) are of special interest to developers writing concurrent programs. Due to the same shared message loop oriented architecture that all Windows GUI frameworks use, concurrency is often an unavoidable necessity to deliver a responsive experience. The reason is subtle. Each window has a special GUI thread whose job is to process messages in its own dedicated message queue. This entails responding to button clicks, repainting the screen, and the like, usually by running application specific event handlers. All events are processed sequentially, one after the other. Code on this thread must be written with great care, however, because any blocking due to I/O or synchronization activity ...

Get Concurrent Programming on Windows now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.