mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (thgroup_add): do not raise ThreadError on terminated
thread addition for compatibility. just warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3b1e7ac785
commit
adec8b726c
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Jul 19 11:27:25 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (thgroup_add): do not raise ThreadError on terminated
|
||||
thread addition for compatibility. just warning.
|
||||
|
||||
Sat Jul 19 04:50:56 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* ext/iconv/charset_alias.rb, ext/iconv/extconf.rb: make wrapper
|
||||
|
|
7
eval.c
7
eval.c
|
@ -9937,9 +9937,6 @@ thgroup_add(group, thread)
|
|||
if (OBJ_FROZEN(th->thgroup)) {
|
||||
rb_raise(rb_eThreadError, "can't move from the frozen thread group");
|
||||
}
|
||||
if (!th->thgroup) {
|
||||
rb_raise(rb_eThreadError, "terminated thread");
|
||||
}
|
||||
Data_Get_Struct(th->thgroup, struct thgroup, data);
|
||||
if (data->enclosed) {
|
||||
rb_raise(rb_eThreadError, "can't move from the enclosed thread group");
|
||||
|
@ -9953,6 +9950,10 @@ thgroup_add(group, thread)
|
|||
rb_raise(rb_eThreadError, "can't move to the enclosed thread group");
|
||||
}
|
||||
|
||||
if (!th->thgroup) {
|
||||
rb_warn(rb_eThreadError, "terminated thread");
|
||||
return;
|
||||
}
|
||||
th->thgroup = group;
|
||||
return group;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue