diff options
author | Erik Johnston <erik@matrix.org> | 2014-10-29 17:02:22 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-10-29 17:02:22 +0000 |
commit | 53216a500d2e0d815581ada87379ecece05b05a5 (patch) | |
tree | aba5393730cee199b6a2b0dc17ef2dc021e68cd1 /synapse/util/async.py | |
parent | Start filling out and using new events tables (diff) | |
download | synapse-53216a500d2e0d815581ada87379ecece05b05a5.tar.xz |
Add a run_on_reactor function
Diffstat (limited to 'synapse/util/async.py')
-rw-r--r-- | synapse/util/async.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/util/async.py b/synapse/util/async.py index 647ea6142c..bf578f8bfb 100644 --- a/synapse/util/async.py +++ b/synapse/util/async.py @@ -21,3 +21,10 @@ def sleep(seconds): d = defer.Deferred() reactor.callLater(seconds, d.callback, seconds) return d + + +def run_on_reactor(): + """ This will cause the rest of the function to be invoked upon the next + iteration of the main loop + """ + return sleep(0) \ No newline at end of file |