るりまサーチ

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

別のキーワード

  1. udpsocket send
  2. socket send
  3. socket msg_send
  4. _builtin send
  5. object send

種類

ライブラリ

キーワード

検索結果

Thread::ConditionVariable (18042.0)

スレッドの同期機構の一つである状態変数を実現するクラスです。

...一つである状態変数を実現するクラスです。

以下も ConditionVariable を理解するのに参考になります。

https://ruby-doc.com/docs/ProgrammingRuby/html/tut_threads.html#UF

=== Condition Variable とは

あるスレッド A が排他領域で動いていたとしま...
...リソースの空きを
待っていても、いつまでも空くことはありません。

以上のような状況を解決するのが Condition Variable です。

スレッド a で条件(リソースが空いているかなど)が満たされるまで wait メソッドで
スレッドを...
...end

alias send enq
alias recv deq
end

if __FILE__ == $0
q = TinyQueue.new(1)
foods = 'Apple Banana Strawberry Udon Rice Milk'.split
l = []

th = Thread.new {
for obj in foods
q.send(obj)
print "sent ", obj, "\n"
end
q.send nil
}...

NEWS for Ruby 3.0.0 (18.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...arning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send
(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned....
...val when called with one argument will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352 17419
* ConditionVariable
* ConditionVariable#wait may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Dir
* Dir.glob and Dir.[] now...
...Struct
* Initialization is no longer lazy. 12136
* Builtin methods can now be overridden safely. 15409
* Implementation uses only methods ending with `!`.
* Ractor compatible.
* Improved support for YAML. 8382
* Use officially discouraged. Read OpenStruct@Caveats section.
*...

NEWS for Ruby 2.5.0 (12.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...consecutive slashes to a single slash. 8352

* webrick
* Server Name Indication (SNI) サポートを追加 13729
* WEBrick::HTTPResponse#send_body_proc を追加 855
* RubyGem としてリリース 13173
* 意図しない振舞いを避けるため Kernel.#open を使用するの...
...しました。
シードを必要としない用途で有用です。9569

* Socket
* Socket::Ifaddr#vhid を追加 13803

* ConditionVariable, Queue, SizedQueue を速度向上のため再実装しました。
これらのクラスはStructのサブクラスではなくなりま...