Can spawn off different operations and then wait for these operations to complete.
Also use event-driven programming and finite-state automaton.
Figure 4 shows control logic for a 15 state FSA for a Web server.
Using FSA has side benefit of doing verification and model checking.