STM

module Control.Concurrent.STM
stm Control.Concurrent.STM
Software Transactional Memory: a modular composable concurrency abstraction. See * Composable memory transactions, by Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy, in /ACM Conference on Principles and Practice of Parallel Programming/ 2005. http://research.microsoft.com/Users/simonpj/papers/stm/index.htm
module Control.Monad.STM
stm Control.Monad.STM
Software Transactional Memory: a modular composable concurrency abstraction. See * Composable memory transactions, by Tim Harris, Simon Marlow, Simon Peyton Jones, and Maurice Herlihy, in /ACM Conference on Principles and Practice of Parallel Programming/ 2005. http://research.microsoft.com/Users/simonpj/papers/stm/index.htm This module only defines the STM monad; you probably want to import Control.Concurrent.STM (which exports Control.Monad.STM).
STM :: (State# RealWorld -> (# State# RealWorld, a #)) -> STM a
base GHC.Conc.Sync, base GHC.Conc
data STM a :: * -> *
stm Control.Monad.STM
A monad supporting atomic memory transactions.
newtype STM a
base GHC.Conc.Sync, base GHC.Conc
A monad supporting atomic memory transactions.
package stm
package
A modular composable concurrency abstraction. Version 2.3
package stm-channelize
package
Turn I/O operations into STM transactions on channels. Version 0.1.1
package stm-chans
package
Additional types of channels for STM. Version 1.3.1
package stm-conduit
package
Provides two simple conduit wrappers around STM channels - a source and a sink. Version 0.4.1
package stm-io-hooks
package
This library provides an Software Transactional Memory (STM) monad with commit and retry IO hooks. A retry-action is run (at least once) if the transaction retries, while commit-actions are executed iff the transaction commits. The AdvSTM monad also gives some atomicity guarantees for commit-actions: * When a TVar is modified in a transaction and this transaction commits, the update remains invisible to other threads until the corresponding onCommit action is run. * If the onCommit action throws an exception, the original values of the modified TVars are restored. Note: The package can be used as a drop-in replacement for Control.Concurrent.STM. This library was inspired by the AdvSTM monad on the Haskell Wiki (see http://haskell.org/haskellwiki/?title=New_monads/MonadAdvSTM). Feedback is welcome! Version 0.7.3
package stm-linkedlist
package
Doubly linked lists are often used in imperative languages to maintain a collection of objects such that an object can remove itself easily.  The same idea applies here.  Thanks to STM, these lists can be shared among threads with little effort. Suppose you have a thread listening for events.  You want to dispatch events to any thread that opts in.  You could write a function that installs an event handler, performs an action, and removes the handler: > withEventHandler list handler action = > bracket (atomically $ LinkedList.append handler list) > (atomically . LinkedList.delete) > (\_ -> action) Then, you could have your listener thread dispatch events using a function like this: > dispatchEvent list event = do > handlers <- atomically $ LinkedList.toList list > forM_ handlers $ \handler -> handler event Version 0.1.0.0
package stm-split
package
Transactional MVars, Vars and Channels with distinguished input and output side. When threads communicate via a TMVar, a TVar or a TChan there are often clearly defined roles, which thread is the sender and which one is receiver. We provide wrappers around the standard concurrency communication channels that make the distinction clear and type safe. For example, if a function has a parameter of type TChan.In then it is sure that it will only write to that channel. Additionally if the compiler warns about an unused TChan.Out that was created by TChan.new then you know that the receiver part of your communication is missing. See also package concurrent-split for non-transactional communication. This package follows the same idea as chan-split but is strictly Haskell 98. Version 0.0
package stm-stats
package
This module provides functions that can replace calls to atomically and count how often the transaction was retried until it succeeded. It can emit warnings when transaction are retried more often than a given threshold, and provides global statistics across all transaction. As an additional feature, if the transaction was named, transaction-related exceptions such as BlockedIndefinitelyOnSTM are replaced by variants that indicate which transaction caused the exception. Changelog: 0.2.0.0: (2011-10-10) : Added warnInSTMFunction to TrackSTMConf. : Bugfix with the global retry count warning. 0.1.0.0: (2011-10-09) : Initial Release Version 0.2.0.0
package stm-tlist
package
This package provides a mutable, singly-linked list type for use in STM. It is based on the design of Control.Concurrent.TChan, and can be used to implement a wide variety of channel types. Version 0.1.1
package stmcontrol
package
Control communication among retrying transactions Version 0.1
package STMonadTrans
package
A monad transformer version of the ST monad Warning! This monad transformer should not be used with monads that can contain multiple answers, like the list monad. The reason is that the will be duplicated across the different answers and this cause Bad Things to happen (such as loss of referential transparency). Safe monads include the monads State, Reader, Writer, Maybe and combinations of their corresponding monad transformers. Version 0.3.1
data Stmt
template-haskell Language.Haskell.TH.Syntax, template-haskell Language.Haskell.TH
type StmtQ = Q Stmt
template-haskell Language.Haskell.TH.Lib, template-haskell Language.Haskell.TH
BlockedIndefinitelyOnSTM :: BlockedIndefinitelyOnSTM
base Control.Exception.Base, base Control.Exception
data BlockedIndefinitelyOnSTM
base Control.Exception.Base, base Control.Exception
The thread is waiting to retry an STM transaction, but there are no other references to any TVars involved, so it can't ever continue.

Show more results