stm-2.5.2.0: Software Transactional Memory
Copyright(c) The University of Glasgow 2005
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityexperimental
Portabilitynon-portable (requires STM)
Safe HaskellTrustworthy
LanguageHaskell2010

Control.Concurrent.STM.TArray

Description

 
Synopsis

Documentation

data TArray i e Source #

TArray is a transactional array, supporting the usual MArray interface for mutable arrays.

It is conceptually implemented as Array i (TVar e).

Instances

Instances details
MArray TArray e STM Source # 
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

getBounds :: Ix i => TArray i e -> STM (i, i) #

getNumElements :: Ix i => TArray i e -> STM Int

newArray :: Ix i => (i, i) -> e -> STM (TArray i e) #

newArray_ :: Ix i => (i, i) -> STM (TArray i e) #

unsafeNewArray_ :: Ix i => (i, i) -> STM (TArray i e)

unsafeRead :: Ix i => TArray i e -> Int -> STM e

unsafeWrite :: Ix i => TArray i e -> Int -> e -> STM ()

MArray TArray e IO Source #

Writes are slow in IO.

Instance details

Defined in Control.Concurrent.STM.TArray

Methods

getBounds :: Ix i => TArray i e -> IO (i, i) #

getNumElements :: Ix i => TArray i e -> IO Int

newArray :: Ix i => (i, i) -> e -> IO (TArray i e) #

newArray_ :: Ix i => (i, i) -> IO (TArray i e) #

unsafeNewArray_ :: Ix i => (i, i) -> IO (TArray i e)

unsafeRead :: Ix i => TArray i e -> Int -> IO e

unsafeWrite :: Ix i => TArray i e -> Int -> e -> IO ()

Ix i => Eq (TArray i e) Source # 
Instance details

Defined in Control.Concurrent.STM.TArray

Methods

(==) :: TArray i e -> TArray i e -> Bool #

(/=) :: TArray i e -> TArray i e -> Bool #