Три способа выполнить множество задач с asyncio
Функция для примера:
async def do_it(n):
await asyncio.sleep(random.uniform(0.5, 1))
return n
1. Последовательный вызов
async def main():
for i in range(100):
result = await do_it(i)
Такой вызов имеет смысл только тогда, когда результат одной задачи требуется для вызова следующей.
Если они независимы, то это антипаттерн, так как аналогичен простому синхронному вызову по очереди.
2. Упорядоченный результат
async def main():
tasks = [do_it(i) for i in range(100)]
results = await asyncio.gather(*tasks)
Выполняет корутины конкурентно и возвращает результат в виде списка.
Полезен когда требуется получить результаты в том же порядке в котором задачи отправлены.
3. Результат по мере готовности
tasks = [asyncio.create_task(do_it(i)) for i in range(100)]
for cor in asyncio.as_completed(tasks):
result = await cor
Так же выполняет корутины конкурентно, но не гарантирует порядок. Результат возвращается по мере готовности, каждый отдельно.
Полезен когда нужно обработать любой ответ как можно скорее.
#async
🚛 We’re building the future of freight operations.
Datatruck has raised a $12M Series A round led by Avenue Growth Partners, to accelerate our mission of transforming how carriers manage operations and cash flow through AI-powered automation.
Our AI-native TMS platform unifies dispatch, finance, and digital workflows into one intelligent system — empowering trucking companies to make faster, smarter, and more profitable decisions across their businesses.
This investment will help us expand our product ecosystem, deepen AI capabilities, and scale adoption across North America’s freight network.
We’re just getting started — the road ahead is wide open. 💡
👉 Learn more: Datatruck.io
#freighttech#logistics#transportation#trucking#saas#ai#seriesa#startup#funding
🚀 Crypto Startups Secure $76 Million in Funding in Early Q2 2026
DefiLlama data reveals that crypto startups raised $76 million in the first week of the second quarter of 2026. According to Odaily, the total funding for the year has approached $500 million. Key funding rounds this week include:
Pharos secured $44 million in a Series A round with participation from SNZ Holding, Chainlink, and Flow Traders. The company focuses on building a high-performance Layer 1 blockchain compatible with Ethereum applications, emphasizing RWA and decentralized infrastructure networks.
Oh raised $7.5 million in a Series A round led by Maven 11, with contributions from L1 Digital, Hashed, Auros Global, and Maelstrom. The project aims to develop a Web3 AI platform offering decentralized AI service tools like OhChat.
Kulipa completed a $6.2 million seed round led by Flourish Ventures and 1kx, with participation from White Star Capital and Fabric Ventures. The company provides branded payment cards for crypto wallets, enabling the conversion of digital assets to traditional currency at checkout.
#CryptoStartups#Funding#Q22026#Pharos#SeriesA#Blockchain#Layer1#Ethereum#Oh#Web3#AI#DecentralizedAI#Kulipa#SeedRound#PaymentCards#CryptoWallets#DigitalAssets#TraditionalCurrency