るりまサーチ

最速Rubyリファレンスマニュアル検索!
57件ヒット [1-57件を表示] (0.034秒)
トップページ > クエリ:read[x] > クエリ:<<[x] > クエリ:join[x]

別のキーワード

  1. stringio read
  2. _builtin read
  3. csv read
  4. io read
  5. tuple read

ライブラリ

クラス

検索結果

ThreadsWait#join(*threads) -> () (21213.0)

終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。

...threads で指定されたスレッドを指定します。

@param threads 複数スレッドの終了を待つスレッドに指定されたthreadsを加えます。

require 'thwait'

threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}

thall = ThreadsWai...
...t.new
p thall.threads #=> []
thall.join(*threads)
p thall.threads
#=> [#<Thread:0x216ec dead>, #<Thread:0x21660 dead>, #<Thread:0x215d4 dead>, #<Thread:0x214bc dead>]...

ThreadsWait#join_nowait(*threads) -> () (9213.0)

終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。 しかし、実際には終了をまちません。

...、threads で指定されたスレッドを指定します。
しかし、実際には終了をまちません。

@param threads 複数スレッドの終了を待つスレッドに指定されたthreadsを加えます。

require 'thwait'

threads = []
5.times {|i|
threads << Thread.new...
...{ sleep 1; p Thread.current }
}

thall = ThreadsWait.new
p thall.threads #=> []
thall.join_nowait(*threads)
p thall.threads #=> [#<Thread:0x21638 sleep>, #<Thread:0x215ac sleep>, #<Thread:0x21520 sleep>, #<Thread:0x21494 sleep>, #<Thread:0x21408 sleep>]
# 実際には終了を待って...

ThreadsWait#next_wait(nonblock = nil) -> Thread (3112.0)

指定したスレッドのどれかが終了するまで待ちます。

...ThreadsWait::ErrNoFinishedThread が発生します。

@raise ErrNoWaitingThread 終了をまつスレッドが存在しない時、発生します。

@raise ErrNoFinishedThread nonblock がtrue でかつ、キューが空の時、発生します。

#使用例
require 'thwait'

threads = [...
...]
2.times {|i|
threads << Thread.new { sleep i }
}

thall = ThreadsWait.new
thall.join_nowait(*threads)
until thall.empty?
th = thall.next_wait
p th
end

@see Queue#pop...

ThreadsWait#empty? -> bool (3012.0)

同期されるスレッドが存在するならば true をかえします。

...ッドが存在するならば true をかえします。

使用例
require 'thwait'

threads = []
3.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}

thall = ThreadsWait.new
p thall.threads.empty? #=> true
thall.join(*threads)
p thall.threads.empty? #=> false...

ruby 1.8.3 feature (114.0)

ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))

...ようになりました。

=== 2005-09-16
: File.join [ruby] [compat]

型チェックを厳密にするようになりました。

$ ruby-1.8.2 -e 'p File.join(1, 2)'
"1/2"

$ ruby-1.8.3 -e 'p File.join(1, 2)'
-e:1:in `join': can't convert Fixnum into String (TypeError)...
...body_exist? [lib] [obsolete]
: Net::HTTPResponse#response [lib] [obsolete]
: Net::HTTPResponse#header [lib] [obsolete]
: Net::HTTPResponse#read_header [lib] [obsolete]

obsolete になりました。VERBOSE モードの時、警告が出ます。

=== 2005-09-10
: OpenSSL::PKCS7::Recipi...
...05-05-16
: singleton class [ruby] [change]
特異クラスは複製できなくなりました。((<ruby-talk:142749>))

$ ruby-1.8.3 -e 'class << "str"; self end.dup'
-e:1:in `initialize_copy': can't copy singleton class (TypeError)
from -e:1

=== 2005-05-15
: Pathname#unlink...

絞り込み条件を変える

1.6.8から1.8.0への変更点(まとめ) (78.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...自身であると定義されました
((<ruby-bugs-ja:313>))。なんだかよくわかりません(^^;

class << Object
p [self.id, self]
class << self
p [self.id, self]
end
end
=> ruby 1.6.7 (2002-03-01) [i586-linux]...
...36703>))

: ((<IO#fsync|IO/fsync>)) [new]

追加

: ((<IO/IO.open>)) [new]

追加

: ((<IO/IO.for_fd>)) [new]
追加

: ((<IO/IO.read>)) [new]

追加。((<ruby-talk:9460>))が実装に至った経緯だと思う

=== LocalJumpError

: ((<LocalJumpError#exit_value|LocalJ...
...できるようになりました。

=== Thread

: ((<Thread#join|Thread/join>)) [compat]

スレッドを待ち合わせる時間を limit で指定できるようになりました。

: ((<Thread/Thread.list>)) [compat]
: ((<ThreadGroup#list|ThreadGroup/list>)) [compat]
終了中(aborting)...

ruby 1.6 feature (78.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...02-13) [i586-linux]
Errno::EAGAIN
Errno::EAGAIN

== 1.6.7 (2002-03-01) -> 1.6.8 (2002-12-24)

: 2002-10-02: Thread (cygwin)

Cygwin で、Thread の切替えが行われないことがありました。
((<ruby-list:36058>)), ((<ruby-list:24637>))

: 2002-10-01: Socket (win...
...n `upcase!': can't modify frozen string (TypeError)
from -:3
ruby 1.6.7 (2002-08-01) [i586-linux]

: 2002-06-10 Fixnum#>>, <<

負の数に対して右シフトすると 0 になることがありました。
((<ruby-bugs-ja:PR#247>))

負の数を引数にした左...
...from -:4

cat = Struct.new("Cat", :name, :age, :life)
a = cat.new("cat", 12, 7)
Thread.new do
abort_on_exception = true
$SAFE = 4
a.life -= 1
end.join
p a.life
=> ruby 1.6.4 (2001-06-04) [i586-linux]
6
=> ruby 1.6.4 (2001-08-06) [i586...