Cross-Platform GUI Programming with wxWidgets

Just as giving a cashier two lines to process instead of one won't make her process more customers per hour, multithreading won't make your application go faster (at least without special hardware). However, it can seem faster to the user because the user interface is more responsive, and like a cashier waiting for credit-card clearance on one of the lines while processing the other, multithreading can use available resources more efficiently. It can also be a good way to solve certain problems more elegantly than would be possible if using only a single thread. In this chapter, we've also touched briefly on avoiding multithreading by using timers, idle event processing, and yielding.

There is more to multithreaded programming than this chapter can cover. For further reading, we recommend Programming with POSIX Threads by David R. Butenhof.

Our next chapter looks at using programming with sockets to pass data between processes.

    Категории