trying to run multiple telethon clients via threading lib. Does anybody know why?
use await client conect() function
don't use threads use asyncio, it's async library after all
where exactly should I use it?
do you have example?
you're missing client.start or connect in "work" but asyncio would do too import asyncio async def work(client): await client.connect() await client.send_message(...) async def main(): await asyncio.gather(*[work(u) for u in accounts]) asyncio.run(main())
thank you, I will try it now
It doesn't raise any error but still doesn't send message (((
Hi. How many tasks can asyncio.gather execute in the same time? I tried to run 10 tasks but it took only 6. Could you please explain?
Обсуждают сегодня