@wallpapersarena · Post #6674 · 14.12.2024 г., 06:30
#Superheroes @WallpapersArena
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
Пребарај: #superheroes
@wallpapersarena · Post #6674 · 14.12.2024 г., 06:30
#Superheroes @WallpapersArena
Hashtags
@wallparpes_hd · Post #842 · 25.04.2020 г., 13:14
Red Hood 2020 #superheroes 📱 Los mejores Wallpapers ⭐📱 @wallparpes_hd
Hashtags
@wallparpes_hd · Post #759 · 21.04.2020 г., 17:54
Hellboy Fanart #superheroes 📱 Los mejores Wallpapers ⭐📱 @wallparpes_hd
Hashtags
@wallparpes_hd · Post #662 · 12.04.2020 г., 17:15
Venom X Punisher #superheroes 📱 Los mejores Wallpapers ⭐📱 @wallparpes_hd
Hashtags
@wallparpes_hd · Post #120 · 19.03.2020 г., 17:20
Doctor Strange In The Multiverse Of Madness #superheroes 📱 Wallpapers Full HD 📱⭐ https://t.me/joinchat/AAAAAE65rdIFyMNq1qiq7A
Hashtags
@wallparpes_hd · Post #108 · 18.03.2020 г., 22:31
Deadpool Cool #superheroes 📱 Wallpapers Full HD ⭐📱 https://t.me/joinchat/AAAAAE65rdIFyMNq1qiq7A
Hashtags
@wallparpes_hd · Post #93 · 18.03.2020 г., 22:27
Doctor Strange In The Multiverse Of Madness #superheroes
Hashtags
@wallparpes_hd · Post #89 · 17.03.2020 г., 23:13
The Punisher Man #superheroes
Hashtags
@wallparpes_hd · Post #88 · 17.03.2020 г., 23:12
Deathstroke #superheroes
Hashtags
@wallparpes_hd · Post #75 · 17.03.2020 г., 14:35
Justice League New 2020 #superheroes
Hashtags
@images · Post #1543 · 30.05.2024 г., 13:43
🍿 The Last Adventure of 'The Umbrella Academy'! 📆Premiere: August 8, 2024 🎭Genre: #Superheroes · #Drama The Hargreeves return for one final mission in the fourth and last season of 'The Umbrella Academy'. This time, without their powers, they must adapt to normal life, though chaos still ensues. 🌀 Elliot Page, Tom Hopper, and the rest of the original cast are back, along with new additions Nick Offerman and Megan Mullally. The curious part: the Thibedeaus, college professors with extreme déjà vu! 🤯 Reginald Hargreeves is back, leading a dark empire, while a mysterious organization believes reality is a lie. Don’t miss the trailer set to 'The Final Countdown'. 🎬💥 > 𝘴𝘦𝘳𝘪𝘦𝘴 · 🚀𝘣𝘰𝘰𝘴𝘵
Hashtags
@images · Post #1746 · 20.12.2024 г., 08:54
🍿 Superman: Legacy, the Rebirth of Hope ☀️ 📆Release: July 11, 2025 🎭Genre: #Action · #Fantasy · #Superheroes I just watched the trailer, and I’m filled with excitement. James Gunn’s Superman (Guardians of the Galaxy) focuses on kindness. David Corenswet (Hollywood) dons a colorful suit, flying and shielding a little girl. Rachel Brosnahan (The Marvelous Mrs. Maisel) brings a spark to Lois Lane, while Nicholas Hoult (Mad Max: Fury Road) promises a compelling Lex Luthor. Guy Gardner, with his bowl cut, couldn’t be more perfect. And Krypto, that dog, melts my heart. This movie looks like it’ll radiate optimism, reminding us that the world needs heroes who inspire. I can’t wait to see it. 🎉
Hashtags