class V1::Util::Group
- V1::Util::Group
- Reference
- Object
Overview
A Group is a collection of fibers working on subtasks that are part of the same overall task.
Defined in:
v1/util/sync.crConstructors
Instance Method Summary
- #cancel : -> ?
- #cancel=(f : Proc(Void))
- #exception : Exception?
- #exception=(exception : Exception?)
-
#spawn(f : Proc(Void))
spwan calls the given function in a new fiber.
-
#wait
wait blocks until all function calls from the Fiber method have returned, then returns the first non-nil exception (if any) from them
Constructor Detail
Instance Method Detail
def spawn(f : Proc(Void))
#
spwan calls the given function in a new fiber.
The first call to return a non-nil exception cancels the group; its exception will be returned by wait
def wait
#
wait blocks until all function calls from the Fiber method have returned, then returns the first non-nil exception (if any) from them