View later.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# +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") }, |