* thread.c: remove Thread.critical(=).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f64fc63cec
commit
e037d72514
@ -1,3 +1,7 @@
|
|||||||
|
Tue Dec 25 22:12:40 2007 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* thread.c: remove Thread.critical(=).
|
||||||
|
|
||||||
Tue Dec 25 21:44:50 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Dec 25 21:44:50 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* tool/make-snapshot: add version number.
|
* tool/make-snapshot: add version number.
|
||||||
|
17
thread.c
17
thread.c
@ -696,13 +696,6 @@ rb_thread_schedule(void)
|
|||||||
|
|
||||||
int rb_thread_critical; /* TODO: dummy variable */
|
int rb_thread_critical; /* TODO: dummy variable */
|
||||||
|
|
||||||
static VALUE
|
|
||||||
rb_thread_s_critical(VALUE self)
|
|
||||||
{
|
|
||||||
rb_warn("Thread.critical is unsupported. Use Mutex instead.");
|
|
||||||
return Qnil;
|
|
||||||
}
|
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_thread_blocking_region(
|
rb_thread_blocking_region(
|
||||||
rb_blocking_function_t *func, void *data1,
|
rb_blocking_function_t *func, void *data1,
|
||||||
@ -1014,8 +1007,7 @@ rb_thread_wakeup(VALUE thread)
|
|||||||
* call-seq:
|
* call-seq:
|
||||||
* thr.run => thr
|
* thr.run => thr
|
||||||
*
|
*
|
||||||
* Wakes up <i>thr</i>, making it eligible for scheduling. If not in a critical
|
* Wakes up <i>thr</i>, making it eligible for scheduling.
|
||||||
* section, then invokes the scheduler.
|
|
||||||
*
|
*
|
||||||
* a = Thread.new { puts "a"; Thread.stop; puts "c" }
|
* a = Thread.new { puts "a"; Thread.stop; puts "c" }
|
||||||
* Thread.pass
|
* Thread.pass
|
||||||
@ -1044,8 +1036,7 @@ rb_thread_run(VALUE thread)
|
|||||||
* Thread.stop => nil
|
* Thread.stop => nil
|
||||||
*
|
*
|
||||||
* Stops execution of the current thread, putting it into a ``sleep'' state,
|
* Stops execution of the current thread, putting it into a ``sleep'' state,
|
||||||
* and schedules execution of another thread. Resets the ``critical'' condition
|
* and schedules execution of another thread.
|
||||||
* to <code>false</code>.
|
|
||||||
*
|
*
|
||||||
* a = Thread.new { print "a"; Thread.stop; print "c" }
|
* a = Thread.new { print "a"; Thread.stop; print "c" }
|
||||||
* Thread.pass
|
* Thread.pass
|
||||||
@ -1304,7 +1295,6 @@ rb_thread_dead(rb_thread_t *th)
|
|||||||
* b = Thread.new { Thread.stop }
|
* b = Thread.new { Thread.stop }
|
||||||
* c = Thread.new { Thread.exit }
|
* c = Thread.new { Thread.exit }
|
||||||
* d = Thread.new { sleep }
|
* d = Thread.new { sleep }
|
||||||
* Thread.critical = true
|
|
||||||
* d.kill #=> #<Thread:0x401b3678 aborting>
|
* d.kill #=> #<Thread:0x401b3678 aborting>
|
||||||
* a.status #=> nil
|
* a.status #=> nil
|
||||||
* b.status #=> "sleep"
|
* b.status #=> "sleep"
|
||||||
@ -1617,7 +1607,6 @@ rb_thread_priority(VALUE thread)
|
|||||||
* end
|
* end
|
||||||
* b.priority = -2
|
* b.priority = -2
|
||||||
* sleep 1 #=> 1
|
* sleep 1 #=> 1
|
||||||
* Thread.critical = 1
|
|
||||||
* count1 #=> 622504
|
* count1 #=> 622504
|
||||||
* count2 #=> 5832
|
* count2 #=> 5832
|
||||||
*/
|
*/
|
||||||
@ -3038,8 +3027,6 @@ Init_Thread(void)
|
|||||||
rb_define_singleton_method(rb_cThread, "exit", rb_thread_exit, 0);
|
rb_define_singleton_method(rb_cThread, "exit", rb_thread_exit, 0);
|
||||||
rb_define_singleton_method(rb_cThread, "pass", thread_s_pass, 0);
|
rb_define_singleton_method(rb_cThread, "pass", thread_s_pass, 0);
|
||||||
rb_define_singleton_method(rb_cThread, "list", rb_thread_list, 0);
|
rb_define_singleton_method(rb_cThread, "list", rb_thread_list, 0);
|
||||||
rb_define_singleton_method(rb_cThread, "critical", rb_thread_s_critical, 0);
|
|
||||||
rb_define_singleton_method(rb_cThread, "critical=", rb_thread_s_critical, 1);
|
|
||||||
rb_define_singleton_method(rb_cThread, "abort_on_exception", rb_thread_s_abort_exc, 0);
|
rb_define_singleton_method(rb_cThread, "abort_on_exception", rb_thread_s_abort_exc, 0);
|
||||||
rb_define_singleton_method(rb_cThread, "abort_on_exception=", rb_thread_s_abort_exc_set, 1);
|
rb_define_singleton_method(rb_cThread, "abort_on_exception=", rb_thread_s_abort_exc_set, 1);
|
||||||
#if THREAD_DEBUG < 0
|
#if THREAD_DEBUG < 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user