Difference between revisions of "Software transactional memory"

From HaskellWiki
Jump to navigation Jump to search
m (HAppS doesn't use any of the properties given by STM.)
(Added link to examples in a blog)
Line 32: Line 32:
   
 
* [[New_monads/MonadAdvSTM#Single_Threaded_Code|Advanced STM Monad]]
 
* [[New_monads/MonadAdvSTM#Single_Threaded_Code|Advanced STM Monad]]
  +
  +
* [http://computationalthoughts.blogspot.com/2008/03/some-examples-of-software-transactional.html Blog: Some examples of Software Transactional Memory in Haskell]
   
 
* Examples from this wiki: Search for "concurrent.stm" at the top of this page.
 
* Examples from this wiki: Search for "concurrent.stm" at the top of this page.

Revision as of 13:59, 18 March 2008

Introduction

Software Transactional Memory, or STM, is an abstraction for concurrent communication. The main benefits of STM are composability and modularity. That is, using STM you can write concurrent abstractions that can be easily composed with any other abstraction built using STM, without exposing the details of how your abstraction ensures safety. This is typically not the case with other forms of concurrent communication, such as locks or MVars.

STM for Haskell was first implemented in GHC 6.4. There exist STM implementations for other compilers.

Resources

Projects using STM

  • Conjure (a bittorrent client) is using STM quite heavily.
  • Shellac is a framework for building read-eval-print style shells. It uses STM, but in a pretty limited way.
  • Pugs (an implementation of Perl 6 in Haskell) uses STM, and also exposes STM to the Perl 6 programmer via a similar interface to STM Haskell.

Examples

  • Examples from this wiki: Search for "concurrent.stm" at the top of this page.