るりまサーチ

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

別のキーワード

  1. _builtin times
  2. integer times
  3. process times
  4. times _builtin
  5. times

種類

ライブラリ

検索結果

Fiber (38126.0)

ノンプリエンプティブな軽量スレッド(以下ファイバーと呼ぶ)を提供します。 他の言語では coroutine あるいは semicoroutine と呼ばれることもあります。 Thread と違いユーザレベルスレッドとして実装されています。

...係を持ちます。Fiber#resume を呼んだファイバーが親になり
呼ばれたファイバーが子になります。親子関係を壊すような遷移(例えば
自分の親の親のファイバーへ切り替えるような処理)はできません。
例外 FiberError が発生しま...
...す。
できることは
*
Fiber#resume により子へコンテキストを切り替える
*
Fiber.yield により親へコンテキストを切り替える
の二通りです。この親子関係は一時的なものであり
親ファイバーへコンテキストを切り替えた時点で解...
...ブロック中で Fiber.yield を呼ぶと親にコンテキストを切り替えます。
Fiber
.yield の引数が、親での Fiber#resume の返り値になります。
//emlist[例:][ruby]{
f = Fiber.new do
n = 0
loop do
Fiber
.yield(n)
n += 1
end
end

5.times do
p f.resume
end

#...

NEWS for Ruby 3.0.0 (1770.0)

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

...照してください。

== 言語仕様の変更

*
Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
*
Procs accepting a single rest argument and keywords...
...he given keys and their values. 15822
*
Windows: Read ENV names and values as UTF-8 encoded Strings 12650
*
Encoding
*
Added new encoding IBM720. 16233
*
Changed default for Encoding.default_external to UTF-8 on Windows 16604
*
Fiber
*
Fiber.new(blocking: true/false) allows you...
...ed on JIT compaction.
*
Decrease code size of hot paths by some optimizations and partitioning cold paths.
*
Instance variables
*
Eliminate some redundant checks.
*
Skip checking a class and a object multiple times in a method when possible.
*
Optimize accesses in...