Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jul 3, 2011
  1. @ko1

    * include/ruby/intern.h, thread_pthread.c (rb_reserved_fd_p,

    ko1 authored
      RB_RESERVED_FD_P): added.  This C API is to limit to access
      fds which are used by RubyVM internal.  In this version of
      CRuby, return 1 if fd is communication pipe.
      If your application needs to close all file descriptors to
      preent resource leak, skip internal fds using this C API.
      We also define a macro RB_RESERVED_FD_P(fd).  So you can write
      #ifndef RB_RESERVED_FD_P
      #define RB_RESERVED_FD_P(fd) 0
      #endif
      for Ruby 1.9.2 or previous version to write compatible extensions.
      See [ruby-core:37727]
    * thread_win32.c (rb_reserved_fd_p): added (return 0 for any fds).
    * io.c (rb_io_initialize): raise ArgumentError if given fd is reserved by Ruby.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 27, 2011
  1. @ko1

    * thread_pthread.c: Stop polling in the timer thread when there are

    ko1 authored
      no waiting thread.  If there are 2 or more runnable threads,
      the timer thread does polling.  Avoid polling makes power save
      for several computers (0.2W per a Ruby process, when I measured).
      If outside-event such as signal or Thread#kill was occuerred
      when the timer thread does not do polling, then wake-up
      the timer thread using communication-pipe (the timer thread
      waits this communication-pipe with select(2)).
      The discussion about this modification can be found from the post
      [ruby-core:33456] and other related posts.
      Note that Eric Wong and KOSAKI Motohiro give us the huge
      contributions for this modification.  Thanks.
    * thread_pthread.c (rb_thread_wakeup_timer_thread): add a function.
      This function wakes up the timer thread using communication-pipe.
    * thread.c (rb_thread_stop_timer_thread): add a parameter which
      specify closing communication-pipe or not.
    * thread.c (rb_thread_terminate_all): do not stop timer thread here
      (ruby_cleanup() terminate timer thread).
    * signal.c: wake up timer thread using
      rb_thread_wakeup_timer_thread() from signal handler.
    * eval.c (ruby_cleanup): use rb_thread_stop_timer_thread(1).
    * process.c: use rb_thread_stop_timer_thread(0)
      (reuse communication-pipe).
    * thread_win32.c (rb_thread_wakeup_timer_thread): add a dummy
      function.
    * vm_core.h: add and fix decl. of functions.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 27, 2010
  1. @ko1

    * thread.c, vm_core.h: make gvl_acquire/release/init/destruct

    ko1 authored
      APIs to modularize GVL implementation.
    * thread_pthread.c, thread_pthread.h: Two GVL implementations.
      (1) Simple locking GVL which is same as existing GVL.
      (2) Wake-up queued threads.  The wake-up order is simple FIFO.
      (We can make several queues to support exact priorities, however
      this causes some issues such as priority inversion and so on.)
      This impl. prevents spin-loop (*1) caused on SMP environemnts.
      *1: Only one Ruby thread acqures GVL again and again.
      Bug #2359 [ruby-core:26694]
    * thread_win32.c, thread_win32.h: Using simple lock
      not by CRITICAL_SECTION but by Mutex.
      Bug #3890 [ruby-dev:42315]
    * vm.c (ruby_vm_destruct): ditto.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Aug 13, 2008
  1. @ko1

    * thread.c, vm_core.h: add manual priority support

    ko1 authored
      using time slice.  if you enable USE_NATIVE_THREAD_PRIORITY
      macro, this mechanism is ignored.  [ruby-dev:33124]
    * thread_pthread.c, thread_win32.c: ditto.
    * test/ruby/test_thread.rb: fix test parameter.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 19, 2008
  1. @ko1

    * thread_win32.c (native_sleep): fix to decrement sleeper count.

    ko1 authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 25, 2007
  1. @ko1

    * thread_pthread.c, thread_pthread.h, thread_win32.c,

    ko1 authored
      thread_win32.c: make some functions static functions.
      a patch from Tadashi Saito <shiba AT mail2.accsnet.ne.jp>
      in [ruby-core:14407]
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @ko1

    * vm_core.h, thread.c, cont.c: add RUBY_VM_SET_INTERRUPT(),

    ko1 authored
      RUBY_VM_SET_TIMER_INTERRUPT(), RUBY_VM_INTERRUPTED().
    * thread.c, thread_pthread.c, thread_win32.c: fix to ignore time slice
      event until sleep.
    * bootstraptest/test_thread.rb: add a test for time limited join test.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 20, 2007
  1. @ko1

    * common.mk, *.ci: renamed to *.c.

    ko1 authored
    * eval_laod.c: renamed to load.c.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Something went wrong with that request. Please try again.