In the traditional threaded model of concurrent programming, when
we share data among threads, we keep it consistent using locks, and we
notify threads of changes using condition variables. Haskells
MVar mechanism improves somewhat upon these tools, but it
still suffers from all of the same problems:
Race conditions due to forgotten
Deadlocks resulting from inconsistent
Corruption caused by uncaught
Lost wakeups induced by omitted
These problems frequently affect even the
smallest concurrent programs, but the difficulties they pose become far
worse in larger code bases or under heavy load.
For instance, a program with a few big
locks is somewhat tractable to write and debug, but contention for those
locks will clobber us under heavy load. If we react with finer-grained
locking, it becomes far harder to keep our software
working at all. The additional bookkeeping will hurt performance even when
loads are light.
Under the Ayatollah Khomeini, life for Christians in Iran was extremely difficult. Christian institutions were forcibly closed, property was confiscated, and Christian leaders were harassed and jailed. Christians even became targets of violence. Late one night in 1980, intruders broke into the home of Bishop Hassan Dehqani-Tafti, the Anglican Bishop of Tehran. They burst into his wife Margaret’s bedroom and fired five shots. One hit her in the hand, but the other four missed, striking her pillow instead. Margaret recovered, but she and Bishop Hassan left Iran for safety in England.
Their son, Bahram, chose to remain in his native country, a decision that would prove fatal. While returning home one night after teaching English at Tehran University, his car was ambushed by government agents, and Bahram was shot and killed. Because his parents were living in exile, they were unable to attend his funeral. However, Bishop Hassan composed a beautiful prayer for the liturgy that concluded with these words: