@TestFlightX · Post #34593 · 11.11.2024 г., 12:54
#GAME#OF #22 https://testflight.apple.com/join/1n8J92a8
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
Пребарај: #of
@TestFlightX · Post #34593 · 11.11.2024 г., 12:54
#GAME#OF #22 https://testflight.apple.com/join/1n8J92a8
@f9y99 · Post #6764 · 20.03.2026 г., 18:55
#OF#孙禾颐 私人定制 情趣 裸舞 露脸 道具自慰 21v 👇 飞机吃瓜尽在吃瓜中心 ↓ https://t.me/f9y99 ✅投稿澄清:@yoozb
@f9y99 · Post #6616 · 18.03.2026 г., 13:38
#OF#孙禾颐 极品美女 道具自慰 弹力插 13V 👇 飞机吃瓜尽在吃瓜中心 ↓ https://t.me/f9y99 ✅投稿澄清:@yoozb
@CirrusNFT · Post #1813 · 24.03.2026 г., 20:38
#OF#ANAL Jett Wayne & Oliver Hunt 推荐速游VPN,按量计费
@f9y99 · Post #7571 · 31.03.2026 г., 18:46
#OF#BJ#徐雅 完美身材 大尺度露奶透奶 极限拉扯 超性感 5v 👇 飞机吃瓜尽在吃瓜中心 ↓ https://t.me/f9y99 ✅投稿澄清:@yoozb
@TFGames · Post #1357 · 07.12.2023 г., 00:36
#POWER#OF#POWER#GAMES https://testflight.apple.com/join/iOu2V3xs
@fluencyinenglish · Post #7852 · 05.04.2022 г., 08:31
#common_mistakes #decrease #in#of @fluencyinenglish معمولاً از عبارت زیر برای کاهش در چیزی صحبت می کنیم. ✔️ decrease in sth با این حال،معمولاً از عبارت زیر برای کاهش مقدار بکار می بریم. ✔️ decrease of sth مثال: • There has been a 2% decrease in the rate of unemployment. 2 درصد کاهش در نرخ بیکاری وجود داشته است. • There has been a decrease of 2%. 2 درصد کاهش وجود داشته است. • There was a slight decrease in his weight after a week of dieting. بعد از یک هفته رژیم، یک کاهش کوچک در وزنش وجود داشت. • Any decrease in tourism could have a serious effect on the local economy. هر گونه کاهشی در گردشگری میتوانست اثری جدی بر اقتصاد محلی بگذارد. • The report's finding on the decrease in violent crime supports the police chief's claims. • We have seen a marked decrease in the number of accidents since these safety measures were introduced. از وقتی این تدابیر امنیتی ارائه شدند، کاهش شدیدی در تعداد تصادفات مشاهده شده است. • We've noticed a steady decrease in jobs available for new graduates in the industry. @fluencyinenglish
Hashtags
@fluencyinenglish · Post #7837 · 18.07.2021 г., 06:26
#common_mistakes #decrease #in#of @fluencyinenglish معمولاً از عبارت زیر برای کاهش در چیزی صحبت می کنیم. ✔️ decrease in sth با این حال،معمولاً از عبارت زیر برای کاهش مقدار بکار می بریم. ✔️ decrease of sth مثال: • There has been a 2% decrease in the rate of unemployment. 2 درصد کاهش در نرخ بیکاری وجود داشته است. • There has been a decrease of 2%. 2 درصد کاهش وجود داشته است. • There was a slight decrease in his weight after a week of dieting. بعد از یک هفته رژیم، یک کاهش کوچک در وزنش وجود داشت. • Any decrease in tourism could have a serious effect on the local economy. هر گونه کاهشی در گردشگری میتوانست اثری جدی بر اقتصاد محلی بگذارد. • The report's finding on the decrease in violent crime supports the police chief's claims. • We have seen a marked decrease in the number of accidents since these safety measures were introduced. از وقتی این تدابیر امنیتی ارائه شدند، کاهش شدیدی در تعداد تصادفات مشاهده شده است. • We've noticed a steady decrease in jobs available for new graduates in the industry. @fluencyinenglish
Hashtags
@TestFlightX · Post #34502 · 06.11.2024 г., 09:41
#BATTLE#OF#SQUARES https://testflight.apple.com/join/wPnR7SfF
@TestFlightX · Post #34445 · 03.11.2024 г., 15:18
#UNIVERSITY#OF#MICHIGAN https://testflight.apple.com/join/pCz4gDT6
Hashtags
@TFGames · Post #2242 · 27.02.2024 г., 22:14
#GAME#OF#REVENGE https://testflight.apple.com/join/5uee2m5t
@BananaSchool69 · Post #280 · 16.11.2024 г., 12:05
#shinaryen#OF#歐美 https://linktr.ee/shinaryen?utm_source=linktree_profile_share<sid=3eb04d0d-27b5-4210-bf81-40692d3267a4
Hashtags