On 3/8/07, Chris Kuklewicz <[EMAIL PROTECTED]> wrote:
What happens in your throw/catch case if I have
stm1 = do some_stm_code_that_throws_your_exception
stm2 = return Foo
and I run "atomically (stm1 `orElse` stm2)" ?
Answer: The exception will prevent running stm2.
In the *specific* case of
Stefan O'Rear wrote:
> On Thu, Mar 08, 2007 at 12:25:15PM +1100, Thomas Conway wrote:
>> Hi All,
>>
>> Consider the following:
>>
>> foo = do
>>v <- newTVar "hi there!"
>>throwDyn v
>>
>> main = do
>>catchDyn (atomically foo) \v -> do
>>x <- atomically (readTVar v)
>>put
On Thu, Mar 08, 2007 at 12:25:15PM +1100, Thomas Conway wrote:
> Hi All,
>
> Consider the following:
>
> foo = do
>v <- newTVar "hi there!"
>throwDyn v
>
> main = do
>catchDyn (atomically foo) \v -> do
>x <- atomically (readTVar v)
>putStr x
>
>
> I.e. throw informa
Hi All,
Consider the following:
foo = do
v <- newTVar "hi there!"
throwDyn v
main = do
catchDyn (atomically foo) \v -> do
x <- atomically (readTVar v)
putStr x
I.e. throw information that gets rolled back from inside a
transaction, catch it and use it.
This looks like