;;;;   -*- Mode: clojure; encoding: utf-8; -*-
;;
;; Copyright (C) 2014 Jong-won Choi
;; All rights reserved.
;;
;;;; Commentary:
;;
;;
;;
;;;; Code:


* Concurrency refers to designing systems using independently executing, logic processes
* Parallelism refers to partitioning a task into multiple parts, each run at the same time.

* Problems with refs
- Write skew - use 'ensure' to avoid
- Live-lock - use 'transaction restart limits' or 'barging - older transaction has the priority'

* STM pitfalls
- I/O may have problems with restart. Maybe use io! macro?
- Class instance mutation
- Large transaction

* Alter can cause retry, but sometimes try is not necessary and commute is better






;;; CONCURRENCY.CLJ ends here
