Hi Tom,
You wrote that you are interested in the programming experience with relaxed
atomicity. What you are asking for are the ideas behind Twilight STM, written
in these papers:
> http://proglang.informatik.uni-freiburg.de/projects/syncstm/techreport2010twilight.pdf
(brief summary of the unde
Clojure has a commute operator whose semantics seem appropriate to your
concerns:
http://clojure.org/refs
http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/commute
Commute in haskell would be roughly :: TVar a -> (a -> a) -> STM a.
The TVar touched by commute does not get m
On Tue, Sep 28, 2010 at 9:19 PM, Brandon Moore
wrote:
>
>
> On Sep 28, 2010, at 6:36 PM, Tom Hawkins wrote:
>
> Thanks for the responses, but I think I should explain a bit more.
> I'm not interested in being able to read the live value of a TVar at
> any arbitrary time (via. unsafeIOToSTM). But
On Sep 28, 2010, at 6:36 PM, Tom Hawkins wrote:
Thanks for the responses, but I think I should explain a bit more.
I'm not interested in being able to read the live value of a TVar at
any arbitrary time (via. unsafeIOToSTM). But rather I would like
looslyReadTVar to have exactly the same seman
On Tue, Sep 28, 2010 at 6:44 PM, Serguey Zefirov wrote:
> 2010/9/29 Tom Hawkins :
>> In the embedded domain, this could be a fault monitor that
>> reads a bunch of constantly changing sensors.
>
> I think that sensor reading belongs to IO, not STM.
>
Sensors would be transfered from IO to TVars v
2010/9/29 Tom Hawkins :
> In the embedded domain, this could be a fault monitor that
> reads a bunch of constantly changing sensors.
I think that sensor reading belongs to IO, not STM.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.has
Thanks for the responses, but I think I should explain a bit more.
I'm not interested in being able to read the live value of a TVar at
any arbitrary time (via. unsafeIOToSTM). But rather I would like
looslyReadTVar to have exactly the same semantics as readTVar, except
that the STM runtime would
On Tue, Sep 28, 2010 at 9:05 AM, Felipe Lessa wrote:
> On Tue, Sep 28, 2010 at 11:01 AM, Antoine Latter wrote:
>> Isn't there an 'unsafeIOToSTM' function somewhere? Something like:
>>
>>> unsafeIOToSTM (IO k) = STM k
>>
>> Then you might not need the case statement.
>
> I thought there was, but I
On Tue, Sep 28, 2010 at 11:01 AM, Antoine Latter wrote:
> Isn't there an 'unsafeIOToSTM' function somewhere? Something like:
>
>> unsafeIOToSTM (IO k) = STM k
>
> Then you might not need the case statement.
I thought there was, but I couldn't find it in the 'stm' package [1],
using Hoogle [2] nor
On Tue, Sep 28, 2010 at 8:54 AM, Felipe Lessa wrote:
> On Tue, Sep 28, 2010 at 10:41 AM, Peter Robinson wrote:
>> readTVarIO :: TVar a -> IO a
>
> One needs to know if it is ok to wrap this IO action into an STM
> action. For example,
>
>> data I a = I a
>>
>> looselyReadTVar :: TVar a -> STM a
On Tue, Sep 28, 2010 at 10:41 AM, Peter Robinson wrote:
> readTVarIO :: TVar a -> IO a
One needs to know if it is ok to wrap this IO action into an STM
action. For example,
> data I a = I a
>
> looselyReadTVar :: TVar a -> STM a
> looselyReadTVar tvar =
> let v = unsafePerformIO (I <$> readTV
Hi Tom,
you can do this with Twilight STM. I recently uploaded the first version
on hackage[1].
The next version including a better algorithm and examples is about to
be released in a few days.
Twilight STM features include tagging of variables and fine-grained
conflict detection, flexible isolat
On 28 September 2010 15:35, Tom Hawkins wrote:
> Has anyone in the STM community considered the ability to read a TVar,
> such that it would allow the transaction to complete even if the TVar
> was modified by another transaction?
Maybe something like this:
(Pasted from
http://www.haskell.org/gh
Has anyone in the STM community considered the ability to read a TVar,
such that it would allow the transaction to complete even if the TVar
was modified by another transaction? (I am assuming this is not how
STM works by default.) For example:
looselyReadTVar :: TVar a -> STM a
Atom [1] has si
14 matches
Mail list logo