Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...srisatish ambati
![近未来的並列 LL](https://cdn-ak-scissors.b.st-hatena.com/image/square/614afafe33e6a3a061a66e18ccf73919cabf80d7/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Flltigermootoh-100731190901-phpapp01-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)
May 23, 2010 [Clojure concurrency - part 3] A Clojure `Ref' is the solution to the problem discussed in the last post. Here is how you create a `ref': (def p (ref 0)) The value of a ref can be changed by `ref-set': (ref-set p 1) But this doesn't work! We get an exception. The idea is that the ref can be changed only from within a `transaction': (dosync (ref-set p 1)) What is so special about a `tr
May 20, 2010 [Cloure concurrency, part 2] In my previous post, I had shown how Clojure atoms help to solve race conditions which occur during read-modify-write of a single entity. But there are situations in which you will be required to act on more than one data structure in your code (from multiple threads). Let's look at a very simple (and somewhat artificial) example. Let's say you have two at
May 17, 2010 [Clojure concurrency part-1] Let's find out what happens when two Clojure threads try to simultaneously update a shared global variable. (def N 0) (defn foo [] (dotimes [i 100000] (def N (inc N)))) (defn start-threads [] (let [t1 (Thread. foo) t2 (Thread. foo)] (do (.start t1) (.start t2) (.join t1) (.join t2)))) (defn main [] (start-threads) N) (println (main)) Run the code many time
May 11, 2010 Clojure has a very interesting set of features which promise to make handling concurrency easier compared to languages like Java. Persistent, immutable data structures, software transactional memory and (almost) pure functional programming are important aspects of the Clojure concurrency framework. Explicit multithreading It's easy to start a thread in Clojure: (defn fun1 [] (println
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く