kopia lustrzana https://github.com/cirospaciari/socketify.py
pull/189/head
rodzic
df212efc27
commit
57518d02f2
|
@ -114,7 +114,12 @@ class Loop:
|
||||||
# clean up uvloop
|
# clean up uvloop
|
||||||
self.uv_loop.stop()
|
self.uv_loop.stop()
|
||||||
return future
|
return future
|
||||||
|
|
||||||
|
def create_background_task(self, bg_task):
|
||||||
|
def next_tick():
|
||||||
|
self.ensure_future(bg_task())
|
||||||
|
self.loop.call_soon(next_tick)
|
||||||
|
|
||||||
def run(self, task=None):
|
def run(self, task=None):
|
||||||
self.started = True
|
self.started = True
|
||||||
if task is not None:
|
if task is not None:
|
||||||
|
|
Ładowanie…
Reference in New Issue