NO-LOCKS manifesto

NO-LOCKS manifesto

When it comes to building multi-threaded programs, as a general approach, we believe the following:

  1. using locks is an anti-pattern – they should be replaced by higher level abstractions
  2. using raw threads is an anti-pattern – they should be replaced by higher level abstractions
  3. concurrency should be approached from the design phase, similar to designing functional aspects
  4. concurrency should be approached top-down
  5. concurrency abstractions should be able to be decomposed
  6. concurrency abstractions should be easily decomposable/composable

Some alternatives

  • tasks
  • immutability
  • actor-based programming
  • communicating sequential processes (or other forms of message passing)
  • reactive programming