Class: Nexo::Concurrent::Task

Inherits:
Struct
  • Object
show all
Defined in:
lib/nexo/concurrent.rb

Overview

A submitted unit of work. Wrapping the block in a Struct keeps submission order explicit (the index into @tasks is the index into the results).

Instance Attribute Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



21
22
23
# File 'lib/nexo/concurrent.rb', line 21

def block
  @block
end