Traditional model synchronization on monitors

Concurrency scenarios occur when you have two or more operations that are executed in parallel one with another. This parallelism can be either true parallelism or simulated parallelism. True parallelism is when your application is executed in parallel on two different CPU cores, like so:

Simulated parallelism is when all of your parallel tasks are executed on the same processor core, however the processor switches from one task to another from time to time. Every task is composed of so-called atomic actions—smallest tasks that cannot be interrupted until they complete. The processor can take ...

Get Mastering Functional Programming 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.