STM +Control.Monad

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).
data STM a :: * -> *
stm Control.Monad.STM
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
catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a
base GHC.Conc.Sync, base GHC.Conc, stm Control.Monad.STM
Exception handling within STM actions.
package ChristmasTree
package
ChristmasTree (Changing Haskell's Read Implementation Such That by Mainpulating ASTs it Reads Expressions Efficiently) is an alternative approach of read that composes grammars instead of parsers. It reads data in linear time, while the function read has an exponential behavior in some cases of data types with infix operators. Version 0.2.1
package DSTM
package
The DSTM package consists of the DSTM library, a name server application, and three sample distributed programs using the library. DSTM is a framework enabling the use of the STM interface, known from concurrent programming, to be used for distributed Haskell applications as well. Provided are a simple Dining Philosophers, a Chat, and a soft real-time Bomberman game application. Distributed communication is transparent to the application programmer. The application designer uses a very simple nameserver mechanism to set up the system. The DSTM library includes the management of unavailable process nodes and provides the application with abstract error information thus facilitating the implementation of robust distributed application programs. For usage please look into the included file: DSTMManual.pdf, also available at http://www.informatik.uni-kiel.de/prog/mitarbeiter/frank-kupke/. Changes from last version: * documentation available online * fixed typos in Chat example * set debug flags to no debug output Version 0.1.2
package email-postmark
package
package FermatsLastMargin
package
Distributed annotation for PostScript and PDF documents. Version 0.1
package iteratee-stm
package
Enumerators and iteratees which read from/write to STM channels. This allows for processes with dedicated IO threads. Version 0.1.2
listMsg :: ErrorList a => String -> [a]
transformers Control.Monad.Trans.Error

Show more results