るりまサーチ

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

別のキーワード

  1. _builtin ===
  2. date ===
  3. ipaddr ===
  4. pathname ===
  5. bigdecimal ===

種類

ライブラリ

キーワード

検索結果

Thread::SizedQueue (18018.0)

サイズの最大値を指定できる Thread::Queue です。

...す。

===


283 より。q をサイズ 1 の SizedQueue オブジェクトに
することによって、入力される行と出力される行が同じ順序になります。
q = [] にすると入力と違った順序で行が出力されます。

require 'thread'

q = SizedQueue.new(...

NEWS for Ruby 2.5.0 (60.0)

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

...れた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.4.0 以降の変更

===
言語仕様の変更

* トップレベルの定数参照を削除しました 11547
* do/end ブロック内部で rescue/else/ensure を...
...なりました 12906
* 文字列の式展開内部の暗黙の to_s 呼び出しにも refinements が影響するようになりました 13812

===
組み込みクラスの更新

* Array
* Array#append を追加 12746
* Array#prepend を追加 12746

* Data
* 非推奨になり...
...t
* Socket::Ifaddr#vhid を追加 13803

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

===
標準添付ライブラリの互換性(機能追加とバグ修正を...

NEWS for Ruby 3.0.0 (42.0)

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

...== Command line options

===
`--help` option

When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754

===
`--backtrace-limit` opti...
...? are now defined and will return true for separate Proc instances if the procs were created from the same block. 14267
* Queue / SizedQueue
* Queue#pop, SizedQueue#push and related methods may now invoke the `block`/`unblock` scheduler hooks in a non-blocking context. 16786
* Ractor
* N...
...te a hash.
* `super` is optimized when the same type of method is called in the previous call if it's not refinements or an attr reader or writer.

===
JIT

* Performance improvements of JIT-ed code
* Microarchitectural optimizations
* Native functions shared by multiple methods are...

Thread::Queue (12.0)

Queue はスレッド間の FIFO(first in first out) の通信路です。ス レッドが空のキューを読み出そうとすると停止します。キューになんら かの情報が書き込まれると実行は再開されます。

...報が書き込まれると実行は再開されます。

最大サイズが指定できる Queue のサブクラス Thread::SizedQueue も提供されています。

===


require 'thread'

q = Queue.new

th1 = Thread.start do
while resource = q.pop
puts resource
end
end...