Summary
The focus of this chapter was on parallel programming patterns implemented in the open source framework OmniThreadLibrary. We could say that we had once again – after looking at the Spring library – returned to the great advice, “Don’t implement, reuse!”
Although the chapter was dedicated to parallel patterns, I started by talking about a specialized thread-safe queue that is used again and again inside OTL’s parallel patterns – a blocking collection. This standalone part of OTL can also be used with Delphi’s TThread
or ITask
, which was also the focus of the demo.
After that, we focused on the three patterns we already discussed in the previous chapter – Async, Join, and Future. We saw how they are mostly similar to PPL implementation but also how they are different in small details.
Next, we explored the Parallel Task pattern. Although it represents just a light wrapper around the Join pattern, it served...