1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Remove unnecessary require 'thread'

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2017-10-08 07:00:01 +00:00
parent 838a91633c
commit 6064132c42
47 changed files with 2 additions and 65 deletions

View file

@ -47,7 +47,6 @@
# Translation of presentation on Ruby by Masatoshi Seki.
require 'socket'
require 'thread'
require 'io/wait'
require 'drb/eq'

View file

@ -5,7 +5,6 @@
=end
require 'drb/drb'
require 'thread'
require 'monitor'
module DRb

View file

@ -10,7 +10,6 @@
#
#
IRB.fail CantShiftToMultiIrbMode unless defined?(Thread)
require "thread"
module IRB
class JobManager

View file

@ -39,8 +39,6 @@ EOF
when 2 # binding in loaded file(thread use)
unless defined? BINDING_QUEUE
require "thread"
IRB.const_set(:BINDING_QUEUE, Thread::SizedQueue.new(1))
Thread.abort_on_exception = true
Thread.start do

View file

@ -7,8 +7,6 @@
# You can freely distribute/modify this library.
#
require 'thread'
#
# In concurrent programming, a monitor is an object or module intended to be
# used safely by more than one thread. The defining characteristic of a

View file

@ -10,9 +10,6 @@
#
# --
require 'thread'
# = mutex_m.rb
#
# When 'mutex_m' is required, any object that extends or includes Mutex_m will

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require 'drb/drb'
require 'thread'
##
# A module to implement the Linda distributed computing paradigm in Ruby.

View file

@ -4,7 +4,6 @@
#
require 'drb/drb'
require 'rinda/rinda'
require 'thread'
require 'ipaddr'
module Rinda

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require 'monitor'
require 'thread'
require 'drb/drb'
require 'rinda/rinda'
require 'forwardable'

View file

@ -11,7 +11,6 @@
#
require "e2mmap"
require "thread"
require "shell/error"
require "shell/filter"

View file

@ -10,8 +10,6 @@
#
#
require "forwardable"
require "thread"
require "sync"
class Shell

View file

@ -1,5 +1,4 @@
# frozen_string_literal: false
require 'thread'
# The Singleton module implements the Singleton pattern.
#

View file

@ -5,7 +5,6 @@
# $Revision: 1.3 $
# by Keiju ISHITSUKA(Nihon Rational Software Co.,Ltd.)
require "thread.rb"
require "e2mmap.rb"
#

View file

@ -2,7 +2,6 @@
#--
# $Release Version: 0.3$
# $Revision: 1.12 $
require "thread"
##
# Outputs a source level execution trace of a Ruby program.

View file

@ -9,8 +9,6 @@
#
# $IPR: abstract.rb,v 1.24 2003/07/11 11:16:46 gotoyuzo Exp $
require 'thread'
require 'webrick/htmlutils'
require 'webrick/httputils'
require 'webrick/httpstatus'

View file

@ -9,7 +9,6 @@
#
# $IPR: filehandler.rb,v 1.44 2003/06/07 01:34:51 gotoyuzo Exp $
require 'thread'
require 'time'
require 'webrick/htmlutils'

View file

@ -9,7 +9,6 @@
#
# $IPR: server.rb,v 1.62 2003/07/22 19:20:43 gotoyuzo Exp $
require 'thread'
require 'socket'
require 'webrick/config'
require 'webrick/log'

View file

@ -91,7 +91,6 @@ module WEBrick
###########
require "thread"
require "timeout"
require "singleton"

View file

@ -2,7 +2,6 @@
distributed Ruby --- chat server
Copyright (c) 1999-2000 Masatoshi SEKI
=end
require 'thread'
require 'drb/drb'
class ChatEntry

View file

@ -17,7 +17,6 @@
require 'drb/drb'
require 'chasen'
require 'thread'
class Dhasen
include DRbUndumped

View file

@ -4,7 +4,6 @@
=end
require 'drb/drb'
require 'thread'
class Logger
def initialize(fname)

View file

@ -3,7 +3,6 @@
Copyright (c) 1999-2000 Masatoshi SEKI
=end
require 'thread'
require 'drb/drb'
DRb.start_service(nil, Thread::Queue.new)

View file

@ -1,7 +1,6 @@
require 'webrick'
require 'drb/drb'
require 'drb/http0'
require 'thread'
module DRb
module HTTP0

View file

@ -35,7 +35,6 @@ How to play.
| 2
=end
require 'thread.rb'
require 'drb/drb'
module DRbNamedObject

View file

@ -3,8 +3,6 @@
# Copyright (c) 1999-2000 Masatoshi SEKI
# You can redistribute it and/or modify it under the same terms as Ruby.
require 'thread'
class TupleSpace
class Template
def initialize(list)

View file

@ -1,7 +1,6 @@
require 'drb/drb'
require 'drb/eq'
require 'rinda/ring'
require 'thread'
class RingEcho
include DRbUndumped

View file

@ -3,8 +3,6 @@
# Copyright (c) 1999-2000 Masatoshi SEKI
# You can redistribute it and/or modify it under the same terms as Ruby.
require 'thread'
class SimpleTupleSpace
def initialize
@hash = {}

View file

@ -3,7 +3,6 @@
# The code demonstrates how a multi-protocol daemon should be written.
require "socket"
require "thread"
port = 8888
res = Socket.getaddrinfo(nil, port, nil, Socket::SOCK_STREAM, nil, Socket::AI_PASSIVE)

View file

@ -1,6 +1,5 @@
#! /usr/local/bin/ruby
require "thread"
require "observer"
class Tick

View file

@ -1,7 +1,6 @@
#
# The Dining Philosophers - thread example
#
require "thread"
srand
#srand

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require 'test/unit'
require 'thread'
require '-test-/postponed_job'
module Bug

View file

@ -2,8 +2,6 @@
require_relative "testbase"
require 'bigdecimal/math'
require 'thread'
class TestBigDecimal < Test::Unit::TestCase
include TestBigDecimalBase

View file

@ -452,8 +452,7 @@ module Test
return
end
# Require needed things for parallel running
require 'thread'
# Require needed thing for parallel running
require 'timeout'
@tasks = @files.dup # Array of filenames.
@need_quit = false

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require "monitor"
require "thread"
require "test/unit"

View file

@ -1,5 +1,4 @@
# frozen_string_literal: false
require 'thread'
class LocalBarrier
def initialize(n)

View file

@ -1,7 +1,6 @@
# frozen_string_literal: false
require 'test/unit'
require 'tempfile'
require 'thread'
class TestAutoload < Test::Unit::TestCase
def test_autoload_so

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require 'test/unit'
require 'thread'
require 'tempfile'
class TestBacktrace < Test::Unit::TestCase

View file

@ -1,7 +1,6 @@
# frozen_string_literal: false
require 'test/unit'
require 'tempfile'
require "thread"
require "-test-/file"
require_relative 'ut_eof'

View file

@ -1,7 +1,6 @@
# -*- coding: us-ascii -*-
# frozen_string_literal: false
require 'test/unit'
require 'thread'
class TestThread < Test::Unit::TestCase
class Thread < ::Thread
@ -966,7 +965,6 @@ _eom
def test_main_thread_status_at_exit
assert_in_out_err([], <<-'INPUT', ["false false aborting"], [])
require 'thread'
q = Thread::Queue.new
Thread.new(Thread.current) {|mth|
begin

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require 'test/unit'
require 'thread'
class TestThreadGroup < Test::Unit::TestCase
def test_thread_init

View file

@ -9,7 +9,6 @@ require "test/unit"
require "tempfile"
require "timeout"
require "tmpdir"
require "thread"
require "io/nonblock"
class TestSocket_UNIXSocket < Test::Unit::TestCase

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require 'test/unit'
require 'thread'
require 'mutex_m'
class TestMutexM < Test::Unit::TestCase

View file

@ -1,7 +1,6 @@
# frozen_string_literal: true
require 'test/unit'
require 'tempfile'
require 'thread'
class TestTempfile < Test::Unit::TestCase
def initialize(*)

View file

@ -1,7 +1,6 @@
# frozen_string_literal: false
require 'test/unit'
require 'timeout'
require 'thread'
class TestTimeout < Test::Unit::TestCase
def test_queue

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require 'test/unit'
require 'thread'
require 'tmpdir'
class TestConditionVariable < Test::Unit::TestCase
@ -94,8 +93,6 @@ class TestConditionVariable < Test::Unit::TestCase
def test_condvar_wait_deadlock
assert_in_out_err([], <<-INPUT, /\Afatal\nNo live threads left\. Deadlock/, [])
require "thread"
mutex = Mutex.new
cv = ConditionVariable.new

View file

@ -1,6 +1,5 @@
# frozen_string_literal: false
require 'test/unit'
require 'thread'
require 'tmpdir'
require 'timeout'
@ -136,7 +135,6 @@ class TestQueue < Test::Unit::TestCase
total_count = 250
begin
assert_normal_exit(<<-"_eom", bug5343, {:timeout => timeout, :chdir=>d})
require "thread"
#{total_count}.times do |i|
open("test_thr_kill_count", "w") {|f| f.puts i }
queue = Queue.new

View file

@ -65,7 +65,6 @@ static const char* rb_mutex_unlock_th(rb_mutex_t *mutex, rb_thread_t volatile *t
*
* Example:
*
* require 'thread'
* semaphore = Mutex.new
*
* a = Thread.new {
@ -673,8 +672,7 @@ queue_closed_result(VALUE self, struct rb_queue *q)
*
* Example:
*
* require 'thread'
* queue = Queue.new
* queue = Queue.new
*
* producer = Thread.new do
* 5.times do |i|
@ -1211,8 +1209,6 @@ struct rb_condvar {
*
* Example:
*
* require 'thread'
*
* mutex = Mutex.new
* resource = ConditionVariable.new
*