るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

ThreadsWait#threads -> Array (21225.0)

同期されるスレッドの一覧を配列で返します。

...レッドの一覧を配列で返します。

使用例
require 'thwait'

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

thall = ThreadsWait.new(*threads)
p thall.threads
#=> [#<Thread:0x21750 sleep>, #<Thread:0x216c4 sleep>, #<Thread:0x21638 slee...

ThreadsWait.new(*threads) -> ThreadsWait (3325.0)

指定されたスレッドの終了をまつための、スレッド同期オブジェクトをつくります。

...をつくります。

@param threads 終了を待つスレッドを一つもしくは複数指定します。

使用例
require 'thwait'

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

thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
pr...

ThreadsWait#join(*threads) -> () (3259.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) -> () (3259.0)

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

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

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

require 'thwait'

threads
= []
5.times {|i|
threads
<< Threa...
...d.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.all_waits(*threads) -> () (3226.0)

指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。

...クを評価します。

@param threads 終了するまでまつスレッドを一つもしくは複数指定します。

require 'thwait'

threads
= []
5.times {|i|
threads
<< Thread.new { sleep 1; p Thread.current }
}
Threads
Wait.all_waits(*threads) {|th| printf("end %s\n", th.insp...

絞り込み条件を変える

ThreadsWait.all_waits(*threads) {|thread| ...} -> () (3226.0)

指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。

...クを評価します。

@param threads 終了するまでまつスレッドを一つもしくは複数指定します。

require 'thwait'

threads
= []
5.times {|i|
threads
<< Thread.new { sleep 1; p Thread.current }
}
Threads
Wait.all_waits(*threads) {|th| printf("end %s\n", th.insp...

Etc::SC_THREADS -> Integer (3203.0)

Etc.#sysconf の引数に指定します。

Etc.#sysconf の引数に指定します。

詳細は sysconf(3) を参照してください。

Etc::SC_THREAD_THREADS_MAX -> Integer (3203.0)

Etc.#sysconf の引数に指定します。

Etc.#sysconf の引数に指定します。

詳細は sysconf(3) を参照してください。

Etc::SC_XOPEN_REALTIME_THREADS -> Integer (3203.0)

Etc.#sysconf の引数に指定します。

Etc.#sysconf の引数に指定します。

詳細は sysconf(3) を参照してください。

Etc::CS_POSIX_V7_THREADS_CFLAGS -> Integer (3202.0)

Etc.#confstr の引数に指定します。

Etc.#confstr の引数に指定します。

詳細は confstr(3) を参照してください。

絞り込み条件を変える

Etc::CS_POSIX_V7_THREADS_LDFLAGS -> Integer (3202.0)

Etc.#confstr の引数に指定します。

Etc.#confstr の引数に指定します。

詳細は confstr(3) を参照してください。

ThreadsWait#empty? -> bool (3130.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#all_waits -> () (3118.0)

指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。

...レッド終了時にブロックを評価します。

使用例
require 'thwait'

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

thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
printf("end %s\n", th.inspect)
}

# 出力例
#=>...
<< 1 2 3 ... > >>