In this chapter, we will learn how to determine what are the best strategies when coping with I/O calls and how to implement these strategies. We will see what distinguishes multithreading from multitasking, when to implement one or the other, and how to do it.
Also, we will learn how to use the ReactPHP library and how to benefit from event-driven programming when dealing with asynchronous I/O calls.
Thus, in this chapter, we will cover the following points:
- Optimizing I/O calls with asynchronous non-blocking code
- Multithreading with the POSIX Threads library
- Implementing a ReactPHP solution