@daler_xusinov · Post #318 · 28.10.2021 г., 16:25
#uiux Landing page design copy 1x1! Telegram | Blog | Portfolio
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
Пребарај: #uiux
@daler_xusinov · Post #318 · 28.10.2021 г., 16:25
#uiux Landing page design copy 1x1! Telegram | Blog | Portfolio
Hashtags
@Ai_artz · Post #1036 · 22.04.2023 г., 10:50
#from#UIUX A clean website landing page for a financial services firm that offers solutions on investments and insurance, use a gold dominant color and white color scheme --v 5 --ar 9:16 ✅ Miami _Discord @ai_artz🌿
@Ai_artz · Post #935 · 10.04.2023 г., 18:16
#from#UIUX An about me page of an online portfolio for a ui/ux desiger, Landing page, magazine style, urban, modern – ar 4:3 – v 5 ✅yoitsmarco#0012 _Discord Join us for more @ai_artz
@Ai_artz · Post #661 · 19.03.2023 г., 09:11
#from#UIUX Portfolio web site designe ✅ deadrk#8928 _Discord @ai_artz
@Ai_artz · Post #652 · 17.03.2023 г., 07:55
#from#UIUX ✅ Guyp _Twitter @ai_artz
@Ai_artz · Post #198 · 31.01.2023 г., 11:29
#from#UIUX ✅ @ LinusEkenstam _Twitter @ai_artz
@fidostudio · Post #16 · 01.12.2021 г., 15:42
Website for Juru Energy from UK. Juru Energy solution-oriented international consulting and engineering firm focused on the energy sector. #web#uiux Follow us: Telegram · Instagram · Dribbble
@fidostudio · Post #15 · 01.12.2021 г., 15:40
Tezkor is a service for ordering fast delivery of food from restaurants and groceries through mobile applications or a website. #web#uiux Follow us: Telegram · Instagram · Dribbble
@fidostudio · Post #9 · 01.12.2021 г., 13:04
Landing pages for Fermopolis. It is an online platform that allows farmers to raise finance, grow agricultural products and then supply them to consumers or return a percentage of sales. #web#uiux Follow us: Telegram · Instagram · Dribbble
@fidostudio · Post #14 · 01.12.2021 г., 15:39
Tezkor is a service for ordering fast delivery of food from restaurants and groceries through mobile applications or a website. #mobile#uiux Follow us: Telegram · Instagram · Dribbble
@fidostudio · Post #11 · 01.12.2021 г., 13:12
Special vaccination App for Covid 19. This App will help you to plan ahead the time, place and type of vaccination. Check out our new work 🙌 Link in bio. #app#uiux Follow us: Telegram · Instagram · Dribbble
@fidostudio · Post #22 · 01.12.2021 г., 16:00
New Interface for iABS. #web#uiux#3D Follow us: Telegram · Instagram · Dribbble