RE: Re[2]: important news: refocusing discussion

29 Mar
2006
29 Mar
'06
5:20 a.m.
On 29 March 2006 11:00, Ross Paterson wrote:
On Tue, Mar 28, 2006 at 10:25:04AM +0100, Simon Marlow wrote:
On 28 March 2006 00:24, Ross Paterson wrote:
How about STM (minus retry/orElse) and TVars as the portable interface? They're trivial for a single-threaded implementation, and provide a comfortable interface for everyone.
It just occurred to me that STM isn't completely trivial in a single-threaded implementation, because exceptions have to abort a transaction in progress.
Almost trivial, though:
import Prelude hiding (catch) import Control.Exception import Data.IORef
-- The reference contains a rollback action to be executed on newtype STM a = STM (IORef (IO ()) -> IO a)
very clever ;-) Simon
6998
Age (days ago)
6998
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Marlow