るりまサーチ

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

種類

ライブラリ

キーワード

検索結果

NEWS for Ruby 3.0.0 (26102.0)

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

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

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...st{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in` i...
...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
* New class added to enable parallel execution. See rdoc-ref:ractor.m...

ruby 1.6 feature (23324.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...-core:00019>))

: 2002-09-11: Queue#((<Queue/pop>))

Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))

: 2002-09-11: SizedQueue.new

引数に 0 以下を受けつけるバグが修正されました。

: 2002-09-05: ((<リテラル/式展開>))

stable snapshot で...
...=> ruby 1.6.8 (2002-10-04) [i586-linux]
""
=> -:1: parse error
ruby 1.7.3 (2002-10-04) [i586-linux]

: SizedQueue#deq, #shift
: SizedQueue#enq

追加(push, pop の別名)。これらが定義されていなかったため、enq などを
呼び出したときスー...
...
のような場合があります)が File#read などで読めないバグが修正されまし
た。

p File.open("/proc/#$$/cmdline").read

=> ruby 1.6.7 (2002-03-01) [i586-linux]
""

=> ruby 1.6.7 (2002-03-29) [i586-linux]
"ruby-1.6\000-v\00...

Thread::SizedQueue (18030.0)

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

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

require 'thread'

q = SizedQueue.new(1)

th = Thread.start {
while line = q....
...pop
print line
end
}

while l = gets
q.push(l)
end
q.push(l)

th.join...