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

Резултати

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

Пребарај: #qatar

当前筛选 #qatar清除筛选
Dan Kovalik

@danielmkovalik · Post #2784 · 10.09.2025 г., 12:15

Israel bombs #Qatar with the blessing of the U.S., further eroding the rule of law in the world and destroying any credibility they have left.

Hashtags

IHMA | Dilfuza Ruzmetova

@IHMA_matbuotkotibi · Post #671 · 07.11.2025 г., 09:38

Dohada O'zbekiston pavilyoni⚡️ “O’zbekiston” telekanali “Jarayon” 18:00 06.11.2025 #QATAR Rasmiy sahifalarimiz🌐 Telegram | Instagram | O'zTV1 Insta |O'zTV1 TG | UTube | O'zTV1FB | UzRadio103.1

Hashtags

White House Watch

@Whitehousewatch · Post #17042 · 14.01.2026 г., 15:30

#Qatar, #Iran: Il Dipartimento della Guerra ha cominciato a ritirare alcune truppe e alcuni asset dalla base al-Udeid in Qatar come precauzione in vista di una decisione di Donald Trump di colpire o meno l'Iran. La base in questione viene utilizzata per ospitare bombardieri, aerei di rifornimento, jet da combattimento, aerei per la sorveglianza e droni. Lo stesso era stato fatto a giugno pirma che gli Stati Uniti colpissero l'Iran.

Hashtags

Islamic World News

@iswnews_en · Post #18548 · 11.04.2026 г., 12:02

🇮🇷/🇺🇸Based on unofficial news from Islamabad, Iran's red lines in negotiations with the US include the following: 1- The Strait of Hormuz must be under Iran's control. 2- Payment of compensation for war damages. 3- Release of Iran's frozen assets. 4- Any ceasefire must be implemented sustainably and genuinely on all relevant fronts. ‼️ Additionally, negotiations will begin after Iranian officials meet with Pakistani Prime Minister Shehbaz Sharif to discuss US violations of the ceasefire terms, at the forefront of which are the release of Iran's frozen funds in Qatar and a ceasefire in Lebanon. These two issues have been set as preconditions for the start of the talks. #Iran#Qatar

Hashtags

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3057 · 16.08.2024 г., 14:40

Do not believe a single word that comes out of the meeting of the genocide enablers in #Qatar Only believe what comes out of the mouth of the resistance in #Gaza That is the only side I trust...and that side is not even present in Qatar.

Hashtags

Islamic World News

@iswnews_en · Post #18016 · 01.04.2026 г., 01:19

🇮🇷/🇺🇸🇶🇦🚢💥The United Kingdom Maritime Trade Operations (UKMTO) has reported an incident 17 nautical miles north of Doha. The security officer reported that a tanker was struck by an unknown projectile, causing damage to the hull above the waterline. The crew is reported safe. 📊 Since the start of the war, Iranian armed forces have struck at least 24 violating vessels in the waters of the Persian Gulf, the Strait of Hormuz, and the Gulf of Oman. These attacks have been carried out using suicide naval drones, suicide drones, cruise missiles, anti‑ship ballistic missiles, armed speedboat assaults, and other means. #Iran#US#Qatar

Islamic World News

@iswnews_en · Post #17450 · 20.03.2026 г., 00:58

🇮🇷/🇺🇸🇶🇦‼️Repairing the damage to the Ras Laffan gas complex will take 5 years! 🔹State-owned QatarEnergy, which operates the Ras Laffan gas complex, told Reuters that the damage inflicted on "two units" of the LNG facility, developed through a joint investment with the American company ExxonMobil, will require three to five years to repair. ➡️ The company added that this incident will reduce its annual revenue by $20 billion and force it to cancel long-term contracts with Italy, Belgium, Korea, and China. ✍️ As the Qataris themselves have acknowledged, Iran's "limited strike" on a "small section" of the Ras Laffan facilities has been this damaging. This reality once again emphasizes that any extensive Iranian attack on these facilities and other similar oil and gas installations in the region could lead to a huge and irreparable catastrophe in the history of human energy! Therefore, the U.S., Europe, and the Persian Gulf states have clearly received Iran's powerful and unequivocal message, and it is unlikely they will make any further mistakes from now on. Of course, the malice of the Zionist regime remains ever-present, but if this mistake is repeated, there will be no way back left for anyone! #Iran#US#Qatar

123•••1011
ПретходнаСтраница 1 од 11Следна