30件ヒット
[1-30件を表示]
(0.013秒)
種類
- インスタンスメソッド (24)
- 文書 (6)
ライブラリ
- thwait (24)
クラス
- ThreadsWait (24)
キーワード
-
NEWS for Ruby 2
. 7 . 0 (6) - empty? (6)
-
join
_ nowait (6) -
next
_ wait (6)
検索結果
先頭5件
-
ThreadsWait
# join(*threads) -> () (26113.0) -
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。
...スレッドに指定されたthreadsを加えます。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads #=> []
thall.join(*threads)
p thall.threads
#=> [#<Thread:0x216ec dead>, #<Thread:... -
ThreadsWait
# join _ nowait(*threads) -> () (14113.0) -
終了を待つスレッドの対象として、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>, #<T... -
ThreadsWait
# empty? -> bool (8012.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... -
ThreadsWait
# next _ wait(nonblock = nil) -> Thread (8012.0) -
指定したスレッドのどれかが終了するまで待ちます。
...k が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... -
NEWS for Ruby 2
. 7 . 0 (12.0) -
NEWS for Ruby 2.7.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...止められます。
* 「$,」にnil以外の値を設定すると警告が出るようになりました。 14240
nil以外の時はArray#joinで参照した時も警告が出ます。
この警告は「-W:no-deprecated」オプションで止められます。
* ヒアドキュメ......ください。
* CMath (cmath gem)
* Scanf (scanf gem)
* Shell (shell gem)
* Synchronizer (sync gem)
* ThreadsWait (thwait gem)
* E2MM (e2mmap gem)
* Proc
* Proc#to_sの形式が変更されました。 16101
* Range
* Range#minmaxが最大値を決...