Created
March 29, 2011 02:38
-
-
Save jhorman/891717 to your computer and use it in GitHub Desktop.
Simple non-blocking sleep in twisted.
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
def sleep(secs): | |
d = Deferred() | |
reactor.callLater(secs, d.callback, None) | |
return d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python3 use case with simple 'sleep' implemention