Weak pointers and STM

John Meacham john at repetae.net
Sun Nov 30 23:59:38 EST 2008


Are there any caveats to using weak pointers and STM together? in
particular, the two cases I am interested in are

1. is using 'deRefWeak' fully safe inside 'unsafeIOtoSTM'? As in, will
it combine arbitrary STM actions with checking if a weak pointer is
still valid atomically?

2. is using an atomically retry safe inside of a finalizer? Will it
introduce any concurrency bottlenecks or can I just consider code run in
a finalizer just like code run in any other thread? 

I just wanted to be sure before I base an integral component of a projects design
on these working properly.

thanks!

        John

 
-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Glasgow-haskell-users mailing list