ScalaのActorライブラリを使えば、Actor modelに基づく簡単に並行処理プログラムを書くことが出来る。ところで、Wikipedia日本語版のアクターモデルの項は英語版の古い版の訳のようだが、ところどころおかしい。 試しに、2つのActorが数字をカウントするプログラムを書いて実行してみた。 $ scalac ActorTest.scala $ scala ActorTest c1: 1 c2: 1 c2: 2 c1: 2 c2: 3 c2: 4 c2: 5 c2: 6 c2: 7 c2: 8 c2: 9 c2: 10 c1: 3 c1: 4 c1: 5 c1: 6 c1: 7 c1: 8 c1: 9 c1: 10 2つのActorの出力が混ざっている。MacBookPro5,5 (Intel Core 2 Duo)で動かしたので、それぞれのActorが各CPUに配置されて実行
As I wrote previously, I'm a fan of message-passing concurrency. But to use it in python, I had to write my own infrastructure. It's far from perfect, but it's working for me. I've simplified it a bit and prepared some code to share with you. The basic idea of my framework is to be and simple and easy to use as possible. There's no Erlang-style pattern matching or process linking. There isn't even
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く