diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-19 03:18:44 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-19 03:18:44 +0000 |
| commit | dbe18cfa65f7afc8dcb354d9c5f88d615f13c66d (patch) | |
| tree | ec52ae93b7033cfd076924885263d8ed99a84cc3 /eval.c | |
| parent | 2aaaa8f432027fca5a58fb1c260594e7db8805cf (diff) | |
| download | ruby-dbe18cfa65f7afc8dcb354d9c5f88d615f13c66d.tar.gz ruby-dbe18cfa65f7afc8dcb354d9c5f88d615f13c66d.tar.xz ruby-dbe18cfa65f7afc8dcb354d9c5f88d615f13c66d.zip | |
* eval.c (thgroup_add): do not raise ThreadError on terminated
thread addition for compatibility. just warning.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; } |
