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

Резултати

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

Пребарај: #guantanamo

当前筛选 #guantanamo清除筛选
Tu Bolsa de Empleo 💼

@Bolsadeempleo_cu · Post #5365 · 02.06.2025 г., 20:30

Emisora Provincial CMKS La Emisora Provincial CMKS oferta dos plazas en el Departamento de Informática, para profesionales con experiencia en temas vinculados al funcionamiento de redes, programación y diseño web, así como seguridad. Si usted es técnico, licenciado o ingeniero informático, usted puede ser parte de esta gran familia radial. Aproveche la oportunidad. El pago mensual supera los 4500 CUP y según los resultados el trabajador puede ser estimulado salarialmente. Puede llamar a los teléfonos: -- 21324040. -- 21323101. Los que gusten serán atendidos en la Casa Radial sito en Calle Donato Mármol # 409 entre Martí y Pedro Agustín Pérez, Ciudad de Guantánamo. [email protected] - 21324040, 21323101 #guantanamo

Hashtags

Venezuelanalysis

@venanalysis · Post #1881 · 15.02.2025 г., 16:24

The Trump administration continues to ramp up its migration crackdown with reports that over 100 Venezuelans have been transferred to the infamous naval base in Guantánamo Bay, Cuba. Read the story: https://venezuelanalysis.com/news/us-sends-dozens-of-venezuelan-migrants-to-guantanamo-as-relatives-plead-innocence/ #Migration#HumanRights#Guantanamo#Trump

Medusa Auge

@medusa_auge · Post #1635 · 16.04.2023 г., 12:07

‼️PAUKENSCHLAG – Freigegebene Gerichtsakten in Guantanamo deuten darauf hin, dass einige der 9/11-Terroristen CIA-Agenten waren‼️ Eine explosive Gerichtsakte der Militärkommission von Guantanamo – einem Gericht, das die Fälle von Angeklagten behandelt, die beschuldigt werden, die Terroranschläge vom 11. September auf New York ausgeführt zu haben – hat anscheinend das Undenkbare bestätigt. https://legitim.ch/paukenschlag-freigegebene-gerichtsakten-in-guantanamo-deuten-darauf-hin-dass-einige-der-9-11-terroristen-cia-agenten-waren/ Willst du mehr davon? Dann abonniere unseren Kanal! 👉@LegitimNews #CIA#FBI#InsideJob#Guantanamo

Google Facts™ [ ️@googlefactss🌎]

@googlefactss · Post #40120 · 18.11.2025 г., 11:01

For over 20 years, the US has detained 39 Muslim men at Guantánamo Bay, with 27 never charged. The CIA operated secret "black sites" where at least 119 Muslim men were held and at least 39 tortured, without accountability. This system of unlawful detention, rendition, and abuse has cost billions, fueled propaganda by armed groups, and undermined global human rights. [Read more] @googlefactss#HumanRights#Guantanamo#Torture#Accountability#usa#liberty#LandOfTheFree

Tu Bolsa de Empleo 💼

@Bolsadeempleo_cu · Post #5354 · 02.06.2025 г., 20:16

Buenas tardes estimados subscriptores A partir de ahora para diferencias las ofertas laborales y para una mayor organización. Le daremos uso a los # por lo que cada oferta tendrá un # en referencia a la provincia , subiremos las de mayor votación en las encuestas. #lahabana#guantanamo#isladelajuventud#santiagodecuba#holguin#granma#artemisa#pinardelrio#cienfuegos#villaclara#ciegodeavila