STM on Android

閲覧: 56 回
最初の未読メッセージにスキップ

zhou...@163.com

未読、
2018/01/08 4:26:122018/01/08
To: Frege Programming Language
I've tryed SillyClock on android and works but when I proceed to more complex transaction involving both writeTVar and orElse, the App crashed because putIfAbsent was not implemented, so I replace java.util.Map to java.util.ConcurrentHashMap and it works again




Dierk König

未読、
2018/01/08 5:11:332018/01/08
To: frege-program...@googlegroups.com
Ok, thanks a lot!
I have to look more closely into this, esp wrt contention 
and effect on performance. 

Cool to see Frege STM on Android!

all the best
Dierk

sent from:mobile 
--
You received this message because you are subscribed to the Google Groups "Frege Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to frege-programming-l...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

V

未読、
2019/07/08 15:20:282019/07/08
To: Frege Programming Language
The log must be ordered to make the Two Phase Locking work correctly. The method putIfAbsent should be rebuild in the TransactionLog locally to make it downwards compatible with older Java library versions.

V

未読、
2019/07/08 15:37:462019/07/08
To: Frege Programming Language
In more detail:
As far as I know, ConcurrentHashMap does not make any statement about the order of the elements. Two Phase Locking relies on the order of locks to avoid dead locks. Thus, if you have many concurrent processes on the same variables and you use a non ordered map for log, you may experience dead locks. Furthermore, if you use ConcurrentHashMap, you have overhead for synchronization, as the TransactionLog does not need to be synchronized because it is thread local. The methods of the TransactionLog will never be called concurrently.

Sorry for the long delay and the first sketchy answer.
全員に返信
投稿者に返信
転送
新着メール 0 件