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

Резултати

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

Пребарај: #ishares

当前筛选 #ishares清除筛选

Lookonchain | ꘜ Aug 13 Update: 10 #Bitcoin ETFs NetFlow: +917 $BTC(+$111.85M)🟢 #iShares(Blackrock) inflows 931 $BTC(+$113.59M) and currently holds 744,540 $BTC($90.83B). 9 #Ethereum ETFs NetFlow: +124,431 $ETH(+$582.96M)🟢 #iShares(Blackrock) inflows 70,802 $ETH($331.71M) and currently holds 3,270,483 $ETH($15.32B). https://x.com/lookonchain/status/1955298316041982211

Lookonchain | ꘜ Aug 12 Update: 10 #Bitcoin ETFs NetFlow: +1,586 $BTC(+$189.72M)🟢 #iShares(Blackrock) inflows 1,158 $BTC(+$138.58M) and currently holds 743,609 $BTC($88.97B). 9 #Ethereum ETFs NetFlow: +231,717 $ETH(+$1.03B)🟢 #iShares(Blackrock) inflows 149,168 $ETH($663.05M) and currently holds 3,199,681 $ETH($14.22B). https://x.com/lookonchain/status/1954903054597455910

Lookonchain | ꘜ Aug 11 Update: 10 #Bitcoin ETFs NetFlow: +3,308 $BTC(+$396.03M)🟢 #iShares(Blackrock) inflows 3,089 $BTC(+$369.73M) and currently holds 742,451 $BTC($88.88B). 9 #Ethereum ETFs NetFlow: +112,031 $ETH(+$470.76M)🟢 #iShares(Blackrock) inflows 62,936 $ETH($264.46M) and currently holds 3,050,513 $ETH($12.82B). https://x.com/lookonchain/status/1953811766271717410

SIGNAL

@finsignal · Post #3170 · 30.05.2024 г., 03:14

🐂🐂🐂🐂🐂🐂 According to analysts, a BTC-ETF called #iShares Bitcoin Trust from #BlackRock has surpassed #GTC from Grayscale in terms of the number of coins at its core. Accordingly, it is now the largest #BTC spot exchange-traded fund in the United States. Bloomberg analyst Eric Balchunas confirmed the leadership of the #BlackRock iShares Bitcoin Trust (BUT) among spot BTC ETFs. Recall that this exchange-traded fund bypassed Grayscale's GTC based on the trading results for the last day. As Eric noted, BlackRock is likely to occupy the top spot "for decades." The reason is a combination of low fees, serious liquidity and the excellent reputation of the iShares brand. 🐂🐂🐂🐂🐂🐂

Lookonchain | ꘜ Aug 14 Update: 10 #Bitcoin ETFs NetFlow: +452 $BTC(+$53.9M)🟢 #ARK21Shares inflows 299 $BTC(+$35.62M) and currently holds 45,656 $BTC($5.44B). 9 #Ethereum ETFs NetFlow: +154,179 $ETH(+$724.02M)🟢 #iShares(Blackrock) inflows 105,900 $ETH($497.3M) and currently holds 3,376,382 $ETH($15.86B). https://x.com/lookonchain/status/1955636055992049670

Crypto M - Crypto News

@CryptoM · Post #65251 · 12.04.2026 г., 10:15

🚀 Bitcoin ETFs See Strong Inflows as Market Interest Grows US spot Bitcoin ETFs experienced significant net inflows exceeding $786 million last week, marking their most robust performance since February. According to NS3.AI, BlackRock's iShares Bitcoin Trust attracted approximately $612 million. Meanwhile, Morgan Stanley's newly launched MSBT fund garnered around $46 million within its initial three trading days. #Bitcoin#ETFs#BlackRock#MorganStanley#CryptoInvestment#MarketInterest#MSBT#iShares#Inflow#BTC