1件ヒット
[1-1件を表示]
(0.029秒)
クラス
- Fiber (1)
検索結果
-
Fiber
. yield(*arg = nil) -> object (28.0) -
現在のファイバーの親にコンテキストを切り替えます。
現在のファイバーの親にコンテキストを切り替えます。
コンテキストの切り替えの際に Fiber#resume に与えられた引数を yield メソッドは返します。
@param arg 現在のファイバーの親に渡したいオブジェクトを指定します。
@raise FiberError Fiber でのルートファイバーで呼ばれた場合に発生します。
//emlist[例:][ruby]{
a = nil
f = Fiber.new do
a = Fiber.yield()
end
f.resume()
f.resume(:foo)
p a #=> :foo
//}