class V1::Util::Group

Overview

A Group is a collection of fibers working on subtasks that are part of the same overall task.

Defined in:

v1/util/sync.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def cancel : -> ? #

[View source]
def cancel=(f : Proc(Void)) #

[View source]
def exception : Exception? #

[View source]
def exception=(exception : Exception?) #

[View source]
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


[View source]
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


[View source]