Created
March 13, 2010 08:38
-
-
Save richcollins/331204 to your computer and use it in GitHub Desktop.
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
Query := Object clone do( | |
delegate ::= nil | |
execute := method( | |
if(delegate, | |
delegate executeQuery(self) | |
, | |
"Query execute" println | |
) | |
) | |
) | |
TimeoutDelegate := Object clone do( | |
executeQuery := method(query, | |
timeout(//Doesn't actually exist in Io. Would need to implement using yielding coros. | |
query execute | |
) | |
) | |
) | |
Query clone setDelegate(TimeoutDelegate clone) execute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment