module Going
Constants
- VERSION
Public Class Methods
go(*args, &blk)
click to toggle source
Creates an async thread to run the block
# File lib/going.rb, line 18 def self.go(*args, &blk) Thread.new(*args, &blk) end
select(&blk)
click to toggle source
Creates a synchronous block that will select the first channel operation to complete. Only one operation inside the block will complete and any operations that are incomplete will be removed afterwards.
# File lib/going.rb, line 28 def self.select(&blk) fail 'a block must be passed' unless block_given? select = SelectStatement.new_instance select.select(&blk) SelectStatement.reset select.call_completion_block nil end