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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #402 · 22 дек.

Отдельно разберём TaskGroup, который пришел на замену gather в Python 3.11. Ключевые отличия ▫️create_task() возвращает объект asyncio.Task, у которого есть соответствюущие методы управления. То есть у нас больше контроля ▫️это контекстный менеджер, который гарантирует что все таски будут остановлены по выходу из контекста ▫️ошибка автоматически отменяет незавершенные задачи, ▫️except* передает нам ExceptionGroup, в котором каждую ошибку можно обработать отдельно import asyncio import random async def do_it() -> str: if random.random() < 0.1: raise ValueError('Oops') delay = random.uniform(0.5, 1.5) await asyncio.sleep(delay) return delay async def main(): try: async with asyncio.TaskGroup() as tg: for _ in range(10): tasks.append(tg.create_task(do_it())) for t in tasks: print(t.result()) except *ValueError as e: for err in e.exceptions: print(err) asyncio.run(main()) Рекомендую изучить страницу Coroutines and Tasks из документации, где представлено больше интересных примеров и механизмов - таймауты - отмена задач - создание задач из другого потока #async

Hashtags

Резултати

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

Пребарај: #voltageos

当前筛选 #voltageos清除筛选
Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #317 · 29.04.2025 г., 06:36

¡New build available! #A15#voltageOS Device: Xiaomi 12T Pro/ Redmi K50 Ultra (diting) Version: 4.3 Download: here Changelog: - Initial A15 QPR2 release - Oss Kernel if you like my work and want to support it please consider making a donation this helps with download server costs and buy a soda!. Donate: paypal

Nothing Phone (2) | Updates

@NothingPhone2Updates · Post #660 · 11.08.2025 г., 15:43

VoltageOS - Unofficial | A15 | Nothing Phone 2 (Pong) 📝Details: - Version: v4.5 - Device: #Pong - Type: #Vanilla - Released: 11/08/25 ⬇️Download: Here | Mirror 📖Changelogs: Initial Build 📔Instructions: Here 🖼Screenshots : Here 🆘 Support : Here 🏷Tags: #AOSP#ROM#VoltageOS#Sandboxing#Unofficial ✍️ Note: • Base firmware 3.0 is recommended. • If you face any bugs, report with logs. • GrapheneOS Appstore : Here • Working Dolby : Here • Meteoric kernel baked in with KSUN 1.0.8 + SUSFS prepatched. • This is the first-ever public release build by the maintainer stepping into ROM building. Feedback is much appreciated! 🏆 Credits: - Built based on Ghosuto's Device Tree - Hellboy for Meteroic kernel - Pong Dev Team & MrDeath - Fabian and Hellboy for Glyph Implementation 👤 Maintainer: @kaushikieeee 🔔Updates: @NothingPhone2Updates 🐙Chat: @NothingPhone2

Xiaomi 12T Pro | K50U | Updates

@xiaomi_12tpro_updates · Post #456 · 21.10.2025 г., 01:50

#Voltageos#AOSP#UNOFFICIAL#A16#BKA#Diting Voltage OS UNOFFICIAL V5.2 | A16 Released: 20/10/2025 Download : SF | Mirror Screenshots : Here Changelog : Here Support:Group Changelogs: • Initial build • Hyper Camera by default • Dolby Audio by default • Support KernelSU Notes: If you want to receive regular updates, you can donate and we will add you to VIP support. Credits:Here By@Jezzay97 | Donate Follow@xiaomi_12tpro_updates Join@xiaomi12tpro_chat