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

Резултати

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

Пребарај: #usergrowth

当前筛选 #usergrowth清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #4090 · 07.02.2025 г., 13:00

Polymarket Thrives Amid Trader Growth Betting platform Polymarket defies expectations, expanding active traders by over 50% to 462,000 since November. However, open interest dropped significantly from $500M to $100M, and trading volume halved from a peak of $2.6B to $1.2B. For detailed insights, visit Forklog's news. #Polymarket#Betting#Trading#Crypto#Finance#MarketTrends#StakeholderEngagement#UserGrowth#Blockchain

Crypto M - Crypto News

@CryptoM · Post #64566 · 09.04.2026 г., 08:31

🚀 Go Inc. Dominates Japan's Taxi Hailing Market Go Inc. operates the leading taxi hailing application in Japan, boasting the highest number of users in the country. Bloomberg posted on X, highlighting the company's significant presence in the Japanese market. The app's popularity underscores Go Inc.'s influence in the transportation sector, as it continues to expand its user base and enhance its services. This development reflects the growing demand for convenient and efficient transportation solutions in urban areas across Japan. #GoInc#Japan#TaxiHailing#Transportation#UrbanMobility#Bloomberg#UserGrowth

Venture Village Wall 🦄

@venturevillagewall · Post #3812 · 07.01.2025 г., 13:00

Investment Rounds Highlight New Innovations RoboForce secures $10M to create a Robotic Workforce for heavy tasks. JAN3 raises $5M for Bitcoin technology aimed at increasing access globally. Mocean Energy Ltd gets $539.99K to enhance ocean wave energy tech. CopyCat raises $500K for AI automation of browser tasks. Spintly secures $407.85K to streamline smart access control integration. Additionally, SettleTON emerges as a new DeFi solution on the TON ecosystem, boasting $250k TVL and 30k active users monthly. More details available in the blog. #AI#Crypto#VC#Robotics#Bitcoin#DeFi#FinTech#OceanEnergy#Automation#SmartAccess#Investment#Blockchain#Technology#Liquidity#NFT#EcoSystem#Efficiency#TechInnovation#UserGrowth#Funding