TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Резултати

Пронајдени 12 слични објави

Пребарај: #phone

当前筛选 #phone清除筛选
KOMPYUTER AKADEMIYASI

@Kompyuter_Akademiyasi · Post #6371 · 18.06.2024 г., 17:00

Tech quiz master #phone ℹ️ Ham IT ni ham ingliz tilini o'rganaman deganlar uchun mobil dastur (android). Ancha vaqtlar bu dastur pullik edi, bugun bepul turibdi! ✅ Ushbu dasturda turli darajalarda IT va kompyuter sohasiga oid testlarni ishlaysiz. Faktlar bo'limida esa faktlarni ko'rishingiz mumkin. ⬇️Play Marketdan yuklash 💻 Kompyuterni birga o'rganamiz ⤵️ 🛫Telegram I 📺YouTube

Hashtags

NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24152 · 27.04.2026 г., 07:01

【🚀 交易市場|郭明錤:OpenAI 要做 AI Agent 手機,聯發科、高通、立訊成關鍵供應鏈 】 #OpenAI#Phone 📍 請見報導: https://abmedia.io/openai-ai-agent-phone-qualcomm 📍 訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

Libreware

@libreware · Post #1068 · 02.05.2022 г., 02:23

Red Redirect outgoing calls to Signal/Telegram/Threema. Tiny app to redirect outgoing calls to Signal/Telegram/Threema if available. You can cancel redirection by clicking on "Redirecting to.." popup. Download - https://github.com/x13a/Red/releases https://github.com/x13a/Red #new#phone @foss_Android

Hashtags

Home decor

@dzdigital3 · Post #18851 · 12.08.2025 г., 21:36

UNIWA X28 Old Man Flip #Mobile#Phone GSM Senior Big Push-Button Flip Phone Dual Sim FM Radio Price 24€ Place your order https://s.click.aliexpress.com/e/_EwCPskl

Libreware

@libreware · Post #1479 · 03.09.2025 г., 22:47

#bootloader unlock wall of shame https://github.com/melontini/bootloader-unlock-wall-of-shame updated guide, check it before buying a #phone Over the past few years, a suspicious number of companies have started to "take care of your data", aka block/strictly limit your ability to unlock the bootloader on your own devices. While this may not affect you directly, it sets a bad precedent. You never know what will get the axe next: Shizuku? ADB? Sideloading? I thought it might be a good idea to keep track of bad companies and workarounds. #android

Addis Standard

@addisstandardeng · Post #21346 · 09.02.2026 г., 08:28

Residents report #phone, #internet#outages in #North_Shewa Zone, leaving families struggling to stay connected Residents in several districts of North Shewa Zone of the #Oromia region say recent disruptions to mobile phone and internet services have left families unable to communicate, heightening concerns among civilians and students struggling to reach relatives in affected areas. Residents who spoke to Addis Standard said the communication disruption began weeks ago and has made it difficult to obtain information about the safety and well-being of family members. This is not the first time communication blackouts have affected the North Shewa Zone. In 2024, residents also reported data outages and network disruptions across parts of the zone in the Oromia region, with some saying the communication blackout persisted for nearly two months amid ongoing insurgency-related security concerns. https://addisstandard.com/?p=55093