Skip to content

Instantly share code, notes, and snippets.

View wolverian's full-sized avatar

Ilmari Vacklin wolverian

View GitHub Profile
require "thread"
class Future
attr_reader :exception, :cancelled
def initialize(&block)
@thread = Thread.new(&block)
@thread.abort_on_exception = false
@exception = nil
@cancelled = false