正在加载图片...
Example applications using threads Threads in a spreadsheet program One thread displays menus and read user input (foreground work) Another thread executes user commands and updates the spreadsheet (background work Adobe PageMaker Writing, design, and production tool for desktop publishing service thread event-handling thread screen-drawing thread When the event-handling thread(e.g, doing a large computation, etc. or the screen-drawing thread is busy, the service thread(e.g,, printing file importing, etc restricts user activity by disabling menu items and displaying a busy "cursor. The user is free to switch to other applications, or even kill the computation through the service thread10 Example applications using threads • Threads in a spreadsheet program – One thread displays menus and read user input (foreground work). – Another thread executes user commands and updates the spreadsheet (background work). • Adobe PageMaker – Writing, design, and production tool for desktop publishing – service thread – event-handling thread – screen-drawing thread – When the event-handling thread (e.g., doing a large computation, etc.) or the screen-drawing thread is busy, the service thread (e.g., printing, file importing, etc.) restricts user activity by disabling menu items and displaying a “busy” cursor. The user is free to switch to other applications, or even kill the computation through the service thread
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有