From: "Shota Fukumori (sora_h)" Date: 2011-03-06T22:14:47+09:00 Subject: [ruby-dev:43318] Re: [Ruby 1.9 - Bug #4474][Open] 複数のスレッドからトランザクションに入ろうとした場合のPStoreの挙動 sora_hです。 rdocはこうなっていますが... > # PStore objects are always reentrant. But if _thread_safe_ is set to true, > # then it will become thread-safe at the cost of a minor performance hit. スレッドセーフになるとどうなるのかという仕様が良くわからない感じです。 で、ちょっとしらべてみたところr15948でこの引数が入ったみたいですね コード書いたのは外部の人か。どういう意図なんでしょうかねえ。 (http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=15948&view=revision) 個人的にnested transaction例外は発生すべきでは無いと思うのですが… P.S.: スレッドセーフ引数周りのテストが無いみたいです (test/test_pstore.rb) 2011/3/6 Masaki Matsushita : > PStoreは、initializeの第2引数thread_safeが真であればデータベースの読み書きをMutexで同期するようになっています。 -- Shota Fukumori a.k.a. @sora_h - http://codnote.net/