Chapter 5. Handling Concurrency in Apex

We have discussed many design patterns of different categories such as creational, structural, and behavioral in the previous chapters. In this chapter, we will specifically discuss concurrency  issues that can arise in code and see how to avoid these issues using the  active object design pattern.

Understanding concurrency issues

In software applications, concurrency is the ability of an application to execute multiple processes simultaneously. While executing simultaneously, these processes can use shared resources and could potentially end up with data corruption or the wrong data.

We will try to understand concurrency issues using a real-life example of driving a car on a road. The following figure shows ...

Get Apex Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.