Daniel Spiewak post will walk you through the many issues that make transactional memory systems elaborate to design. In it, he also provides numerous code listing written in Scala setting the foundation for a transactional memory framework. Read Daniel's post on 'Software Transactional Memory in Scala' http://www.codecommit.com/blog/scala/software-transactional-memory-in-scala