2008-11-06から1日間の記事一覧

OCamlの並行プログラミング拡張 concurrent cell

OCaml-Nagoyaの会にて、id:osiireさんの concurrent cell (OCamlの並行プログラミングの拡張) の話を伺った。 当日の話について詳しくは ocaml-nagoya : ivarの必要性 より。当初、問題そのものがちょっとよくわからなかったのだけど、要するに OCamlの標準…

wrap_abort の話 ()

OCaml (Concurrent ML?) の Event.wrap_abort という関数はちょっと面白い. val wrap_abort : 'a event -> (unit -> unit) -> 'a event wrap_abort ev fn returns the event that performs the same communications as ev, but if it is not selected the f…

Event.wrap_abort を π計算 で表現してみる その2

ひとつ前のエントリ でテキトーに作った abort 演算子を使って、OCamlプログラムのコード例を追ってみる。 open Event let start_server () = let in_ch = new_channel () in let rec loop () = let (x, ret_ch, nack_ch) = sync (receive in_ch) in loop (s…