Skip to content

Instantly share code, notes, and snippets.

View wuputah's full-sized avatar

Jonathan Dance (JD) wuputah

View GitHub Profile
wuputah / later.rb
Created September 17, 2012 05:51
Later: a simple thread proxy
View later.rb
# +Later+ is a typical object proxy built around a Thread. You pass it a block
# and it will start performing that task in a Thread. Later, you can call any
# method on the object and it will proxy the call to the return value from
# +Thread#value+ (which joins the thread).
# Example:
# data = [
# Later { open("") },
# Later { open("") },