4 ms·
It will be free of concurrency bugs including deadlocks. This is the promise of CSP. The requirement is data is shared only via blocking IPC and never directly
by robot 6y ago
It will be free of concurrency bugs including deadlocks. This is the promise of CSP. The requirement is data is shared only via blocking IPC and never directly using a lock. (and similarly one must not share a pointer to private data, as another poster has pointed out)
You can compose small systems, even with multiple parties, prove they cannot deadlock, then make them a 'black box' with defined IO, and build larger, more complex systems with equal properties.
The downside is you must guard every piece of shared data with a separate thread, but there may be ways to reduce the performance penalty.
- pcwalton 6y agoHow do you prevent process A from waiting on a receive from process B while process B waits on a receive from process A?