Threads
l Threads allow more than one “thread” of
execution in a program at a time
Useful for GUI’s – when you want GUI to remain
responsive to user input even when the program is
busy doing something else
Handling slow IO – e.g. network IO
l Threads are supported by most operating
System’s today
l Java Supports threads by:
Direct support for Threads in language
Library routines that support multi-threading
l But not all, in particular swing, see documentation
25