Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imprort Liba
- class Bla:
- def __init__(self):
- self.loop = None
- def foo(self):
- # эта дёргается либой
- asyncio.gather(self.bar())
- async def bar(self):
- # тут всякая магия творится
- pass
- async def main():
- bla = Bla()
- bla.loop = asyncio.get_running_loop()
- liba = Liba()
- liba.dosomeshit(callback=bla.foo)
- asyncio.run(main())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement