@botsgram_cu · Post #4863 · 07.08.2022 г., 15:05
@thekillpro_musicbot Con este bot puede descargar canciones y videos, además de poder reproducir música en un videochat o chat de voz 🎧🎤 #musica#videochat#chatvoz (Visto en @Botsgram_cu)
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #401 · 15 дек.
Функция asyncio.wait() это еще один способ вызвать множество асинхронных задач. Она работает в нескольких режимах. 1. Самый простой - ждем завершения всех задач async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(10)] done, pending = await asyncio.wait( tasks, return_when=asyncio.ALL_COMPLETED ) for task in done: try: print(task.result()) except Exception as e: print(e) Очень похоже на gather, но работает не так. ▫️возвращает не результаты, а два сета с объектами Task у которых можно забрать результат через task.result() если они в списке done ▫️не гарантирует порядок результатов так как оба объекта это set ▫️не выбрасывает исключение когда оно появляется, а сохраняет его в Task. Исключение появится когда попробуете забрать резултьтат. 2. Ждем завершения первой задачи, даже если там ошибка. async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(3)] done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_COMPLETED ) # в done может быть несколько задач! for task in done: try: print(task.result()) except Exception as e: print(f"Fail: {e}") # Оставшиеся задачи в pending, как правило, нужно отменить, иначе они будут продолжать работать for task in pending: task.cancel() В сете done будут таски которые успели завершится, причем как успешно так и нет. 3. До первой ошибки. Тоже самое, но с аргументом FIRST_EXCEPTION done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_EXCEPTION ) Функция завершается как только первая задача упадет с ошибкой. Учтите, что в любом случае done вы можете обранужить несколько задач, как с ошибками так и успешные. ↗️ Полный листинг примеров здесь #async
Hashtags
Пребарај: #videochat
@botsgram_cu · Post #4863 · 07.08.2022 г., 15:05
@thekillpro_musicbot Con este bot puede descargar canciones y videos, además de poder reproducir música en un videochat o chat de voz 🎧🎤 #musica#videochat#chatvoz (Visto en @Botsgram_cu)
Hashtags
@perspectiveix · Post #1951 · 30.03.2020 г., 13:30
🤳Video Chat Apps Rise to Prominence Amid Pandemic As a significant part of the world population is currently on lockdown in an attempt to contain the #coronavirus pandemic, people are turning to technology to work, communicate and stay in touch with their loved ones. Unsurprisingly, workplace communication tools such as #Slack and #MicrosoftTeams have seen a jump in usage as working from home has become the new norm in recent weeks. People are also making use of similar tools in their personal lives, however, leading to a spike in downloads of #VideoChat apps. According to Priori Data, global downloads of #Skype, #Houseparty and #Zoom each surged by more than 100% in March, with the latter proving particularly popular among people meeting up virtually while being confined to their homes. The videoconferencing app was downloaded nearly 27 million times this month, up from just 2.1 million times in January. While Zoom is definitely the rising star among video chat apps, Skype remains far ahead in terms of active users. According to Priori Data, the #Microsoft-owned service had 59 million daily active users on its iOS and Android apps in March, compared to just 4.3 million for Zoom. It needs to be noted though, that many people also use Skype for other ways of communication, while Zoom has specialized on video conferences, so it may not be a fair comparison to make. 🦅@PerspectiveIX via Statista.