[#42945] [Ruby 1.8-Bug#4231][Open] configure.bat --with-winsock2 が socket/extconf.rbに効いていない — Masahiro Kitajima <redmine@...>

Bug #4231: configure.bat --with-winsock2 が socket/extconf.rbに効いていない

8 messages 2011/01/05

[#43027] [Ruby 1.9-Feature#4280][Assigned] SJIS should be an alias of Windows-31J, not of Shift_JIS — Usaku NAKAMURA <redmine@...>

Feature #4280: SJIS should be an alias of Windows-31J, not of Shift_JIS

13 messages 2011/01/14
[#43030] [Ruby 1.9-Feature#4280] SJIS should be an alias of Windows-31J, not of Shift_JIS — Motohiro KOSAKI <redmine@...> 2011/01/14

チケット #4280 が更新されました。 (by Motohiro KOSAKI)

[#43031] Re: [Ruby 1.9-Feature#4280] SJIS should be an alias of Windows-31J, not of Shift_JIS — "U.Nakamura" <usa@...> 2011/01/14

こんにちは、なかむら(う)です。

[#43033] Re: [Ruby 1.9-Feature#4280] SJIS should be an alias of Windows-31J, not of Shift_JIS — KOSAKI Motohiro <kosaki.motohiro@...> 2011/01/14

2011年1月14日16:35 U.Nakamura <usa@garbagecollect.jp>:

[#43039] ext/openssl development repository — Hiroshi Nakamura <nakahiro@...>

W3J1YnktY29yZTozNDQxNl3jga7ml6XmnKzlkJHjgZHniYjjgafjgZnjgIIKCuacgOi/kU1hcnRp

21 messages 2011/01/14
[#43040] Re: ext/openssl development repository — "U.Nakamura" <usa@...> 2011/01/14

こんにちは、なかむら(う)です。

[#43041] Re: ext/openssl development repository — Yusuke ENDOH <mame@...> 2011/01/14

遠藤です。

[#43053] Re: ext/openssl development repository — Hiroshi Nakamura <nakahiro@...> 2011/01/17

MjAxMS8xLzE0IFl1c3VrZSBFTkRPSCA8bWFtZUB0c2cubmUuanA+Ogo+Pj4gwqAgwqAgwqAgwqAg

[#43092] pthread_cond を用いたConditionVariable — keiju@... (Keiju ISHITSUKA)

けいじゅ@いしつかです.

15 messages 2011/01/24

[ruby-dev:43099] Re: pthread_cond を用いたConditionVariable

From: keiju@... (石塚圭樹)
Date: 2011-01-25 06:10:38 UTC
List: ruby-dev #43099
けいじゅ@いしつかです.

In [ruby-dev:43098] the message: "[ruby-dev:43098] Re: pthread_cond を
用いたConditionVariable", on Jan/25 12:38(JST) Yusuke ENDOH writes:

>遠藤です。

>現行の CV もコア部分 (Mutex#sleep) は native_sleep の 
>pthread_cond_wait のはずなんですが、何が違うんでしょうね。細々した部
>分がRuby 実装部分で Array とかいじってるのが遅いのかなあ。

たぶんそうだと思います. waitで待っているThreadの数が多くなるほど現行の
CVはパフォーマンスが悪くなります. ただ, 待ちthreadが1000とかのオーダー
だと, 6倍ぐらいのパフォーマンスの低下になります(新CVは1.3倍). ただ, 待
ちthreadが1000 とかは実用上はあまりないと思いますが.

>こういうのは安定させるのが大変そうですね。

そうなんですよね. ですので, もっと良く知っている人の力を借りたいと思っ
たわけです.

>パッチ眺めただけで申し訳ないんですが、
>
>+  BLOCKING_REGION_CORE({
>+      native_mutex_lock(&arg->cv->lock);
>+      th->transition_for_lock = 0;
>+      native_cond_wait(&arg->cv->cond, &arg->cv->lock);
>+      th->transition_for_lock = 1;
>+      native_mutex_unlock(&arg->cv->lock);
>+    });
>
>の部分は、native_mutex_lock の直前に別スレッドで CV#signal が呼ばれたとき、
>signal が無視される気がしました (気のせいかもしれませんが) 。
>
>+  native_mutex_lock(&arg->cv->lock);
>+  BLOCKING_REGION_CORE({
>+      th->transition_for_lock = 0;
>+      native_cond_wait(&arg->cv->cond, &arg->cv->lock);
>+      th->transition_for_lock = 1;
>+    });
>+  native_mutex_unlock(&arg->cv->lock);
>
>とすればいい、のかなあ。

確かにここは気にはなっていたのですが...

thread_pthread.cの

  native_sleep(rb_thread_t *th, struct timeval *tv)

の実装が同じようになっていたので合わせたんですよねぇ... 
こっちのConditionVariableの方に問題あるとすると, native_sleepの方も問
題ある?


__
---------------------------------------------------->> 石塚 圭樹 <<---
---------------------------------->> e-mail: keiju@ishitsuka.com <<---

In This Thread