[ruby-cvs:58808] ko1:r51660 (trunk): * ext/thread/thread.c: move definitions of Queue, SizedQueue

ko1 at ruby-lang.org ko1 at ruby-lang.org
Sat Aug 22 08:36:24 JST 2015


ko1	2015-08-22 08:36:23 +0900 (Sat, 22 Aug 2015)

  New Revision: 51660

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51660

  Log:
    * ext/thread/thread.c: move definitions of Queue, SizedQueue
      and ConditionalVariables to thread_tools.c. In other wowrds,
      such classes are built-in.
      [Feature #8919]
      At first, I planned to embed only a Queue class.
      However, rubygems requires 'thread.rb' (rubygems are
      required at first, when launch MRI without --disable-gems).
      So most of people require 'thread.rb' as an embedded library.
      Now, ext/thread/thread.c is empty, only for a dummy for
      compatibility.
    * thread.c: move a definition of Mutex class to thread_tools.c.
      And define Mutex class under Thread (so now Mutex is Thread::Mutex).
      Because other thread related classes are also defined under Thread.
      We remain ::Mutex as Thread::Mutex. Only an inspect result is changed.
    * common.mk: add dependency from thread.o to thraed_tools.c.

  Added files:
    trunk/thread_tools.c
  Modified files:
    trunk/ChangeLog
    trunk/common.mk
    trunk/ext/thread/thread.c
    trunk/thread.c


More information about the ruby-cvs mailing list