mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-16 23:11:34 +01:00
Add a run_on_reactor function
This commit is contained in:
parent
e7858b6d7e
commit
53216a500d
1 changed files with 7 additions and 0 deletions
|
@ -21,3 +21,10 @@ def sleep(seconds):
|
||||||
d = defer.Deferred()
|
d = defer.Deferred()
|
||||||
reactor.callLater(seconds, d.callback, seconds)
|
reactor.callLater(seconds, d.callback, seconds)
|
||||||
return d
|
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)
|
Loading…
Reference in a new issue