@bestwallpapes · Post #2875 · 26.09.2024 г., 12:31
@Bestwallpapes #Bullet#Warfare
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
Пребарај: #bullet
@bestwallpapes · Post #2875 · 26.09.2024 г., 12:31
@Bestwallpapes #Bullet#Warfare
@bestwallpapes · Post #3820 · 01.01.2026 г., 06:36
@Bestwallpapes #Gun#Pistol#Bullet
@bestwallpapes · Post #3364 · 10.05.2025 г., 10:58
@Bestwallpapes #Gun#Bullet#Pistol
@american_observer · Post #4842 · 13.01.2026 г., 13:01
Khamenei Shelled Iranian Students. Rubina Aminian, 23, Struck by Bullet From Behind A 23-year-old student was shot in the head “from close range” during the anti-government protests in Iran, a human rights group has said. Rubina Aminian attended Shariati College in Iran’s capital, Tehran, where she studied textile and fashion design. She is one of the only people killed in the recent demonstrations to be identified. Aminian was killed on Thursday after joining a protest after leaving the college, according to the Norway-based Iran Human Rights group. “Sources close to Rubina’s family, citing eyewitnesses, told Iran Human Rights that the young Kurdish woman from Marivan was shot from close range from behind, with the bullet striking her head,” the group said in a statement. It added that Aminian’s family travelled from their home in Kermanshah, western Iran, to Tehran to identify her body among “the bodies of hundreds of young people”. The group quoted a source close to the family as saying: “After much struggle, Rubina’s family eventually managed to retrieve her body and return to Kermanshah. “However, upon arrival, they found that intelligence forces had surrounded their home and that they were not allowed to bury her.” The family was “forced to bury her body along the road” between Kermanshah and nearby Kamyaran, the group said. Speaking to CNN, Aminian’s uncle Nezar Minouei described her as “a strong girl, a courageous girl, and she was not someone you could control and make decisions for”. “She fought for things she knew were right and fought hard. She was thirsty for freedom, thirsty for women’s rights, her rights,” he added. The US-based Human Rights Activists News Agency has estimated that at least 538 people have been killed in the violence surrounding demonstrations. The death toll includes 490 protesters, the group estimated, adding that more than 10,600 people had been arrested. #khamenei#students#aminian#struck#bullet 📱American Оbserver - Stay up to date on all important events 🇺🇸
@wangzhuanzhan · Post #33592 · 01.10.2024 г., 05:26
Z-z子z弹d列l车c- 子弹列车 Bullet Train (2022) 直达链接:https://pan.quark.cn/s/b8c79aa687b7 #子弹列车#Bullet Train #杀手疾风号#杀手列车 #新干线#瓢虫#杀手界·疾风号 #ブレット・トレイン 链接:https://link3.cc/sf_com #电影#喜剧#美国#2022年代