Skip to content

Instantly share code, notes, and snippets.

@richcollins
Created March 13, 2010 08:38
Show Gist options
  • Save richcollins/331204 to your computer and use it in GitHub Desktop.
Save richcollins/331204 to your computer and use it in GitHub Desktop.
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