-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Hi,
would it be possible to split run()
method into preparation part, which creates sending and receiving coroutines and the execution part?
Right now, with the code I am integrating your module into, I had to copy-paste some of the run()
functionality into:
def ready(self, host, port, loop=None):
self.loop = loop or asyncio.get_event_loop()
self.sock.bind((host, port))
self.connection_made()
stask = self._send_periodically()
rtask = self._recv_periodically()
return stask, rtask
so that later I could schedule execution with some other coroutine using Nursery
from aionursery
. Otherwise, I was running into exceptions being thrown while my app was exiting.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels