Skip to content

Instantly share code, notes, and snippets.

JD wuputah

Block or report user

Report or block wuputah

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wuputah
wuputah / later.rb
Created Sep 17, 2012
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("http://google.com") },
# Later { open("http://duckduckgo.com") },
You can’t perform that action at this time.