るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.042秒)
トップページ > バージョン:2.4.0[x] > クエリ:@[x] > クエリ:start[x] > クエリ:broadcast[x]

別のキーワード

  1. smtp start
  2. net/smtp start
  3. http start
  4. pop start
  5. net/http start

ライブラリ

検索結果

Thread::ConditionVariable#broadcast -> self (54376.0)

状態変数を待っているスレッドをすべて再開します。再開された スレッドは Thread::ConditionVariable#wait で指定した mutex のロックを試みます。

状態変数を待っているスレッドをすべて再開します。再開された
スレッドは Thread::ConditionVariable#wait
で指定した mutex のロックを試みます。

@return 常に self を返します。

//emlist[例][ruby]{
mutex = Mutex.new
cv = ConditionVariable.new
flg = true

3.times {
Thread.start {
mutex.synchronize {
puts "a1"
while (flg)
cv.wait(mutex)
...