るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

ThreadsWait#threads -> Array (24131.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:0x2163...

ThreadsWait#join_nowait(*threads) -> () (12265.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) -> () (12232.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.inspect) }

# 出...

ThreadsWait.all_waits(*threads) {|thread| ...} -> () (12232.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.inspect) }

# 出...

static void rb_thread_wait_other_threads(void) (12200.0)

絞り込み条件を変える

ThreadsWait#next_wait(nonblock = nil) -> Thread (12130.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#all_waits -> () (12124.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)
}

# 出力例
#=> #<Thread:0x214bc r...

ThreadsWait (12000.0)

複数スレッドの終了を待つ機能を提供します。

複数スレッドの終了を待つ機能を提供します。

ThreadsWait::ErrNoWaitingThread (12000.0)

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

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

@see ThreadsWait#next_wait...

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

絞り込み条件を変える

Etc::CS_POSIX_V7_THREADS_CFLAGS -> Integer (9202.0)

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

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

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

Etc::CS_POSIX_V7_THREADS_LDFLAGS -> Integer (9202.0)

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

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

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

ThreadsWait#finished? -> bool (9124.0)

すでに終了したスレッドが存在すれば true を返します。

...に終了したスレッドが存在すれば true を返します。

使用例
require 'thwait'

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

thall = ThreadsWait.new(*threads)
p thall.finished? #=> false
sleep 3
p thall.finished? #=> true...

ThreadsWait::ErrNoFinishedThread (9000.0)

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

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

@see ThreadsWait#next_wait...

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

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

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

使用例
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.inspe...

絞り込み条件を変える

<< 1 2 3 ... > >>