22 Oct
2002
22 Oct
'02
7:56 p.m.
It has a different type:
atomicModifyIORef :: IORef a -> (a -> (a,b)) -> IO b modifyIORef :: IORef a -> (a -> a) -> IO ()
It would break backwards compatability, but
modifyIORef_ :: IORef a -> (a -> IO a) -> IO () modifyIORef :: IORef a -> (a -> IO (a, b)) -> IO b
(both specified atomic) would be consistent with the MVar names.
Did you really mean those types, and not the types I quoted? That implies unsafeInterleaveIO if they have to be atomic. Cheers, Simon
22 Oct
22 Oct
8:01 p.m.
New subject: The Death of Finalizers
On Tue, Oct 22, 2002 at 12:56:52PM +0100, Simon Marlow wrote:
Did you really mean those types, and not the types I quoted? That implies unsafeInterleaveIO if they have to be atomic.
Sorry, I meant the types you quoted. So the analogy isn't that strong.
8768
Age (days ago)
8768
Last active (days ago)
1 comments
2 participants
participants (2)
-
Ross Paterson -
Simon Marlow