仙人掌世界
learn - innovate - share
Showing posts with label
concurrency
.
Show all posts
Showing posts with label
concurrency
.
Show all posts
Apr 7, 2012
ScalaSTM 試用
›
STM( software transactional memory )是種 concurrency control 機制,相對於用 locking 進行同步化,更安全與簡單,以下使用帳戶轉帳的例子實作比較locking與STM 帳號轉帳案例 多組帳號同時以隨機金...
1 comment:
Mar 18, 2012
Random / Math.random() / ThreadLocalRandom
›
java.util.Random java.util.Random 亂數演算法會依賴 seed 數值產生亂數,並在產生亂數後重新產生 seed, 在 Multi-thread 下為了保證在各Thread取到不同的亂數, java.util.Random 在實作上使用 opt...
6 comments:
›
Home
View web version