[#37248] [Feature:1.9] Enumerator#inspect — "Yusuke ENDOH" <mame@...>
遠藤です。
At Tue, 2 Dec 2008 23:59:52 +0900,
まつもと ゆきひろです
こんにちは、なかむら(う)です。
At Wed, 3 Dec 2008 18:39:59 +0900,
[#37265] [Feature #819] Caching Symbol#to_proc — Shumpei Akai <redmine@...>
Feature #819: Caching Symbol#to_proc
[#37275] [Bug #821] uninitialized constant Test::Unit::AutoRunner — Naohisa Goto <redmine@...>
Bug #821: uninitialized constant Test::Unit::AutoRunner
In article <4937d5c0586c_87b76ae0c6417f@redmine.ruby-lang.org>,
[#37278] invalid byte sequence by pack format 'A' or 'a' — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
[#37295] [BUG:trunk] Encoding in which Array#pack returns when the last format is 'u', 'M', 'm' — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
まつもと ゆきひろです
[#37337] [Feature #841] Object#self — "rubikitch ." <redmine@...>
Feature #841: Object#self
まつもと ゆきひろです
こんにちは、なかむら(う)です。
[#37357] Math and NaN — Tadayoshi Funaba <tadf@...>
Math.sin に NaN を与えてもそのまま NaN が返ってきますが、Math.sqrt はエ
まつもと ゆきひろです
> |Math.sin に NaN を与えてもそのまま NaN が返ってきますが、Math.sqrt はエ
[#37370] IA-64とx64でBigDecimalの割り算の計算結果がおかしい — TAKANO Mitsuhiro <tak@...32.tk>
-----BEGIN PGP SIGNED MESSAGE-----
[#37378] Ruby開発ミーティングログ — SASADA Koichi <ko1@...>
ささだです.
こんにちは、なかむら(う)です。
こんにちは、なかむら(う)です。
[#37384] [Bug #853] Rake のテストが無い — okkez _ <redmine@...>
Bug #853: Rake のテストが無い
[#37390] [BUG:trunk] r20625 dumps core and many strings associated with wrong encoding — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
Yugui (Yuki Sonoda) さんは書きました:
[#37392] [1.9:Feature] faster bignum multiplication by karatsuba method — "Yusuke ENDOH" <mame@...>
遠藤です。
[#37427] Re: [ruby-core:20448] [Bug #727] Signal(CLD) seems not to work on OS X — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
[#37455] Re: [ruby-cvs:27996] Ruby:r20778 (trunk): * common.mk (complex.$(OBJEXT), rational.$(OBJEXT)): Properly add — Nobuyoshi Nakada <nobu@...>
なかだです。
At Tue, 16 Dec 2008 15:14:40 +0900,
[#37458] [Bug #891] MiniTest::Assertions#assert_instance_of should use Object#instance_of? — okkez _ <redmine@...>
Bug #891: MiniTest::Assertions#assert_instance_of should use Object#instance_of?
[#37483] (was Re: [ruby-cvs:28066]) — "Akinori MUSHA" <knu@...>
At Wed, 17 Dec 2008 19:57:17 +0900 (JST),
(2008/12/17 20:25), Akinori MUSHA wrote:
At Thu, 18 Dec 2008 00:56:00 +0900,
[#37490] minitest/spec, minitest/mock を標準添付から外しませんか? — okkez <okkez000@...>
okkez です。
[#37496] when to use default_internal — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
[#37505] Re: [ruby-cvs:28084] Ruby:r20866 (trunk): * error.c (exc_equal): duck typing equal to make it transitive. — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
[#37513] Current status of 1.9.1 RC1's issues — "Yugui (Yuki Sonoda)" <yugui@...>
Hi, folks
咳といいます。
Yuguiです
咳といいます。
On 12/21/08 11:22 PM, Masatoshi SEKI wrote:
咳といいます。
Yuguiです。
Yuguiです。
[#37525] [Bug #914] Integer#upto(NaN) — tadayoshi funaba <redmine@...>
Bug #914: Integer#upto(NaN)
[#37537] [Bug #913] mathn した場合、sqrt(NaN) が複素数になる — Yuki Sonoda <redmine@...>
チケット #913 が更新されました。 (by Yuki Sonoda)
[#37555] [Bug #919] tool/file2lastrev.rbでエラー — Tadashi Saito <redmine@...>
Bug #919: tool/file2lastrev.rbでエラー
[#37560] fail to complie ext pty in cygwin — Masaki Suketa <masaki.suketa@...>
助田です。
[#37572] [Bug:1.9] `initialize_copy': wrong argument type #<Class:0x825d23c> (expected Data) (TypeError) — Tanaka Akira <akr@...>
以下のプログラムで、
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
[#37576] [BUG:trunk] encoding for stdio's — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
[#37591] [BUG:trunk] [m17n] TestCSVFeatures fails because of r20905 — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
[#37646] [Bug #943] Segmentation fault (cygwin) — Martin Dürst <redmine@...>
Bug #943: Segmentation fault (cygwin)
[ruby-dev:37531] Re: [Bug: trunk] GC from blocking region
ささだです.
U.Nakamura wrote::
> In message "[ruby-dev:37448] [Bug: trunk] GC from blocking region"
> on Dec.15,2008 22:44:31, <ko1@atdot.net> wrote:
>> (c) blocking_region の中で,さらに ruby な環境にさわれる状態になり(GVL
>> を取得する),メモリ確保を行う,ということが考えられます.性能はもちろん
>> 落ちますが(使いどころを間違えると,とてもとても遅くなります),どーして
>> も必要な場合は使う,ってことが出来るかと思います.
>
> 現状これができるAPIがないわけですが、追加できるものならすると
> しても、いつ頃これが可能になりそうですか?
作ってみました.これで動くかやってもらえませんか.あと,名前のセンスが
悪すぎるとか,そういう話もあるかと思うので,いい名前募集中です.
注意:
- rb_thread_call_with_gvl() に渡す関数の返値は VALUE だと
mark されないことがあるので,VALUE の受け渡しは基本的にしない
ちなみに,[ruby-dev:37448] で示した解決策は穴があって,xmalloc したメ
モリは xfree しなければならないという制約があります.なので,以下のよう
にするのがよいのではないかと思います.
(a) malloc 試行 -> 失敗
(b) rb_thread_call_with_gvl() を使って GC を強制発生
(c) malloc 試行 -> 失敗
(d) C レベルでの資源を回収(後始末)
(e) rb_thread_call_with_gvl() で呼び出した関数中で NoMemoryError 発生
Index: vm_core.h
===================================================================
--- vm_core.h (リビジョン 20894)
+++ vm_core.h (作業コピー)
@@ -363,6 +363,7 @@ typedef struct rb_thread_struct
int slice;
native_thread_data_t native_thread_data;
+ void *blocking_region_buffer;
VALUE thgroup;
VALUE value;
Index: thread.c
===================================================================
--- thread.c (リビジョン 20894)
+++ thread.c (作業コピー)
@@ -947,6 +947,7 @@ static inline void
blocking_region_begin(rb_thread_t *th, struct rb_blocking_region_buffer
*region,
rb_unblock_function_t *func, void *arg)
{
+ th->blocking_region_buffer = region;
region->prev_status = th->status;
set_unblock_function(th, func, arg, ®ion->oldubf);
th->status = THREAD_STOPPED;
@@ -1033,6 +1034,32 @@ rb_thread_blocking_region(
}, ubf, data2);
return val;
+}
+
+/* alias of rb_thread_blocking_region() */
+VALUE
+rb_thread_call_without_gvl(
+ rb_blocking_function_t *func, void *data1,
+ rb_unblock_function_t *ubf, void *data2)
+{
+ return rb_thread_blocking_region(func, data1, ubf, data2);
+}
+
+void *
+rb_thread_call_with_gvl(void *(*func)(void *), void *data1)
+{
+ rb_thread_t *th = ruby_thread_from_native();
+ struct rb_blocking_region_buffer *brb =
+ (struct rb_blocking_region_buffer *)th->blocking_region_buffer;
+ struct rb_unblock_callback prev_unblock = th->unblock;
+ void *r;
+
+ blocking_region_end(th, brb);
+ /* enter to the Ruby world */
+ r = (*func)(data1);
+ /* levae from Ruby world */
+ blocking_region_begin(th, brb, prev_unblock.func, prev_unblock.arg);
+ return r;
}
/*
--
// SASADA Koichi at atdot dot net