TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #425 · 20 апр.

Недавно делал быстрый прототип асинхронного приложения в котором требовалось вызывать много синхронного кода. Да, я знаю, что это не лучший дизайн, но нужно было быстрое решение на один процесс и без очередей. Поэтому я выполнял код в потоках. Выглядело это примерно так: from fastapi.concurrency import run_in_threadpool async def execute(data: DataRequest) -> DataResponse: try: result = await run_in_threadpool(sync_function, data) return DataResponse(data=result) except Exception as e: return DataResponse( error=str(e), success=False, ) В общем работает нормально. Для всех вызовов под капотом используется общий тредпул, всё работает предсказуемо. Но потребовалось изменить количество запускаемых в пуле потоков (по умолчанию создается 40 воркеров). Так как дело происходит с FastAPI, делается это через lifespan используя настройки anyio: import anyio @asynccontextmanager async def lifespan(app: FastAPI): limiter = anyio.to_thread.current_default_thread_limiter() limiter.total_tokens = 100 yield # если вдруг нужно вернуть обратно limiter.total_tokens = 40 Зачем менять количество воркеров? - уменьшить, если оперативки мало (один тред занимает ~8мб) - увеличить чтобы выдержать нагрузку Если есть предложения получше при тех же вводных - предлагайте😉 #async

Hashtags

Резултати

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

Пребарај: #securitize

当前筛选 #securitize清除筛选
NEWS 鏈新聞-ABMedia

@abmedia_news · Post #24394 · 06.05.2026 г., 02:30

【📜 政策監理|Securitize 獲 FINRA 批准,攜手 Jump、Jupiter 在 Solana 推受監管鏈上股票交易】 #DeFi#FINRA#Securitize Securitize 獲准成為首家託管證券的 broker-dealer,在 Solana 建立鏈上市場堆疊。 獲 FINRA 批准後,平台支援與穩定幣 atomic swaps,由 Jump 提供二級市場流動性。該方案消除傳統結算風險,使代幣化股票具備真實交易能力。 📍閱讀全文: https://abmedia.io/securitize-jump-trading-jupiter 📍 訂閱鏈新聞頻道:https://linktr.ee/abmedia.io

Crypto M - Crypto News

@CryptoM · Post #64995 · 10.04.2026 г., 13:15

🚀 Securitize Integrates Tokenized Assets with TRON Network Securitize, a platform specializing in the tokenization of real-world assets (RWA), has announced its integration with the TRON network. According to Foresight News, this development enables Securitize to introduce its tokenized funds and securities onto the TRON blockchain. This integration marks a significant step in expanding the accessibility and functionality of tokenized assets within the blockchain ecosystem. #Securitize#Tokenization#TRON#Blockchain#RWA#DigitalAssets#CryptoIntegration#TRX

Crypto M - Crypto News

@CryptoM · Post #64710 · 09.04.2026 г., 15:29

🚀 Securitize Appoints Brett Redfearn as President Amid $3.9 Billion Tokenized Asset Management Securitize has announced the appointment of Brett Redfearn, a former executive at the SEC and JPMorgan, as its new president. According to NS3.AI, Redfearn will also join the company's board of directors. This strategic move comes as Securitize manages $3.9 billion in tokenized assets, based on data from RWA.xyz. Redfearn's extensive experience in financial regulation and asset management is expected to bolster Securitize's leadership team and enhance its operations in the rapidly evolving digital asset sector. #Securitize#BrettRedfearn#TokenizedAssets#DigitalAssets#AssetManagement#FinancialRegulation#Leadership#Blockchain#FinTech

Crypto M - Crypto News

@CryptoM · Post #65049 · 10.04.2026 г., 16:29

🚀 Securitize's Potential Market Impact Highlighted by Benchmark Securitize is poised for significant growth as it prepares to go public through a merger with Cantor Equity Partners II, trading under the ticker SECZ. According to NS3.AI, Benchmark has reiterated a $16 price target for SECZ, emphasizing that capturing just one basis point of the approximately $44 trillion market value of NYSE-listed companies could more than double Securitize's current platform assets, which are roughly $4 billion. #Securitize#MarketImpact#IPO#CantorEquityPartners#SECZ#NS3AI#Benchmark#NYSE#Finance#Investment#StockMarket#Growth