Summary
The purpose of this chapter was to use multithreaded and distributed computing on a practical example that also involves RxPHP.
We used PHP Parser library to make static code analysis of PHP scripts. We wrapped the parser with the RxPHP operator and ran it in parallel in multiple threads using the pthreads extension and in multiple workers with Gearman.
We also saw how we can make thread pools reusable in RxPHP by wrapping them with ThreadPoolOperator
.
The next chapter will cover topics that didn't fit into any of the previous ones, and show some interesting and advanced use cases for RxPHP.