* eval.c (rb_thread_initialize): Thread objects cannot be initialized
again. fixed: [ruby-core:04067] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3be3c95ca0
commit
5e51e94304
@ -1,3 +1,8 @@
|
||||
Wed Jan 5 12:49:39 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* eval.c (rb_thread_initialize): Thread objects cannot be initialized
|
||||
again. fixed: [ruby-core:04067]
|
||||
|
||||
Wed Jan 5 02:30:11 2005 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* random.c (init_by_array): imported from mt19937ar-cok.tgz.
|
||||
|
13
eval.c
13
eval.c
@ -11698,10 +11698,21 @@ static VALUE
|
||||
rb_thread_initialize(thread, args)
|
||||
VALUE thread, args;
|
||||
{
|
||||
rb_thread_t th;
|
||||
|
||||
if (!rb_block_given_p()) {
|
||||
rb_raise(rb_eThreadError, "must be called with a block");
|
||||
}
|
||||
return rb_thread_start_0(rb_thread_yield, args, rb_thread_check(thread));
|
||||
th = rb_thread_check(thread);
|
||||
if (th->stk_max) {
|
||||
NODE *node = th->node;
|
||||
if (!node) {
|
||||
rb_raise(rb_eThreadError, "already initialized thread");
|
||||
}
|
||||
rb_raise(rb_eThreadError, "already initialized thread - %s:%d",
|
||||
node->nd_file, nd_line(node));
|
||||
}
|
||||
return rb_thread_start_0(rb_thread_yield, args, th);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user