If the interactive subsystem was designed along the lines of an event
driven framework there would be a real need for threads. Where the
keypress of any of the AID keys was handled by signaling an event in
the RPG program. The event handlers are required to not do much work
so that the main program loop could continue to read from the event
message queue. Long running functions like F7 to scan a document or F8
to get data from a web service would run in a thread and signal an
event when done.