mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* remove trailing spaces, expand tabs.
This commit is contained in:
parent
3e5b885cd2
commit
cbe06cd350
4 changed files with 14 additions and 14 deletions
|
@ -268,7 +268,7 @@ def show_limit(testsrc, opt = '', **argh)
|
||||||
$stderr.print '.'
|
$stderr.print '.'
|
||||||
$stderr.print @reset
|
$stderr.print @reset
|
||||||
$stderr.puts if @verbose
|
$stderr.puts if @verbose
|
||||||
|
|
||||||
if @tty
|
if @tty
|
||||||
$stderr.puts "#{erase}#{result}"
|
$stderr.puts "#{erase}#{result}"
|
||||||
else
|
else
|
||||||
|
|
|
@ -2,7 +2,7 @@ show_limit %q{
|
||||||
threads = []
|
threads = []
|
||||||
begin
|
begin
|
||||||
threads << Thread.new{sleep}
|
threads << Thread.new{sleep}
|
||||||
|
|
||||||
raise Exception, "skipping" if threads.count >= 10_000
|
raise Exception, "skipping" if threads.count >= 10_000
|
||||||
rescue Exception => error
|
rescue Exception => error
|
||||||
puts "Thread count: #{threads.count} (#{error})"
|
puts "Thread count: #{threads.count} (#{error})"
|
||||||
|
@ -15,7 +15,7 @@ show_limit %q{
|
||||||
fiber = Fiber.new{Fiber.yield}
|
fiber = Fiber.new{Fiber.yield}
|
||||||
fiber.resume
|
fiber.resume
|
||||||
fibers << fiber
|
fibers << fiber
|
||||||
|
|
||||||
raise Exception, "skipping" if fibers.count >= 10_000
|
raise Exception, "skipping" if fibers.count >= 10_000
|
||||||
rescue Exception => error
|
rescue Exception => error
|
||||||
puts "Fiber count: #{fibers.count} (#{error})"
|
puts "Fiber count: #{fibers.count} (#{error})"
|
||||||
|
|
20
thread.c
20
thread.c
|
@ -702,15 +702,15 @@ thread_do_start(rb_thread_t *th)
|
||||||
void rb_ec_clear_current_thread_trace_func(const rb_execution_context_t *ec);
|
void rb_ec_clear_current_thread_trace_func(const rb_execution_context_t *ec);
|
||||||
rb_control_frame_t *
|
rb_control_frame_t *
|
||||||
rb_vm_push_frame(rb_execution_context_t *sec,
|
rb_vm_push_frame(rb_execution_context_t *sec,
|
||||||
const rb_iseq_t *iseq,
|
const rb_iseq_t *iseq,
|
||||||
VALUE type,
|
VALUE type,
|
||||||
VALUE self,
|
VALUE self,
|
||||||
VALUE specval,
|
VALUE specval,
|
||||||
VALUE cref_or_me,
|
VALUE cref_or_me,
|
||||||
const VALUE *pc,
|
const VALUE *pc,
|
||||||
VALUE *sp,
|
VALUE *sp,
|
||||||
int local_size,
|
int local_size,
|
||||||
int stack_max);
|
int stack_max);
|
||||||
|
|
||||||
static int
|
static int
|
||||||
thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_start)
|
thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_start)
|
||||||
|
@ -817,7 +817,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
|
||||||
rb_threadptr_unlock_all_locking_mutexes(th);
|
rb_threadptr_unlock_all_locking_mutexes(th);
|
||||||
rb_check_deadlock(th->vm);
|
rb_check_deadlock(th->vm);
|
||||||
|
|
||||||
rb_fiber_close(th->ec->fiber_ptr);
|
rb_fiber_close(th->ec->fiber_ptr);
|
||||||
}
|
}
|
||||||
thread_cleanup_func(th, FALSE);
|
thread_cleanup_func(th, FALSE);
|
||||||
gvl_release(th->vm);
|
gvl_release(th->vm);
|
||||||
|
|
|
@ -1157,7 +1157,7 @@ native_thread_create(rb_thread_t *th)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
const size_t stack_size = th->vm->default_params.thread_machine_stack_size + th->vm->default_params.thread_vm_stack_size;
|
const size_t stack_size = th->vm->default_params.thread_machine_stack_size + th->vm->default_params.thread_vm_stack_size;
|
||||||
const size_t space = space_size(stack_size);
|
const size_t space = space_size(stack_size);
|
||||||
|
|
||||||
th->ec->machine.stack_maxsize = stack_size - space;
|
th->ec->machine.stack_maxsize = stack_size - space;
|
||||||
|
|
Loading…
Reference in a new issue