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

Резултати

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

Пребарај: #collectiveintelligence

当前筛选 #collectiveintelligence清除筛选
EdgeMarket.AI 📣

@edgemarketai · Post #8169 · 09.05.2026 г., 11:11

The internet rewards attention. EdgeMarket is designed to reward accuracy. We are building a decentralised validation layer where communities collectively identify signal, filter noise, and strengthen truth through time. Noise: • Clickbait • Manipulation • Speculation • Fear • Bias Signal: • Clarity • Accuracy • Alignment Maybe the future isn’t predicted. Maybe it’s discovered. $SIGNAL powers the ecosystem. Validate. Earn. Shape the future. #EdgeMarket#SIGNAL#Web3AI#TruthValidation#CollectiveIntelligence

EdgeMarket.AI 📣

@edgemarketai · Post #8007 · 25.02.2026 г., 12:02

Cultural dominance isn’t random. Streams, momentum, timing signal compounds before headlines notice. EdgeMarket tracks collective conviction before outcomes are obvious. Earn for validating truth. 👉https://edgemarket.ai/bnb/validate-results #EdgeMarket#CollectiveIntelligence#CulturalTrends#SignalOverNoise#DecentralizedAI

EdgeMarket.AI 📣

@edgemarketai · Post #8002 · 23.02.2026 г., 14:09

By February 23, the story will already be written. EdgeMarket explores how decentralised oracles, collective intelligence, and AI signals converge to forecast global outcomes — transparently, without manipulation. Prediction is infrastructure. Truth is a system. #EdgeMarket#DecentralisedOracles#CollectiveIntelligence#AIInference#OlympicData#FutureOfPrediction#Web3Infrastructure

EdgeMarket.AI 📣

@edgemarketai · Post #8170 · 09.05.2026 г., 11:13

🚨 SIGNAL TGE • MAY 2026 🚨 EdgeMarket is entering the next phase. $SIGNAL will power the liquidity layer behind a new generation of AI validated prediction infrastructure. This is not just another token launch. This is the activation of decentralised truth validation infrastructure. ⚡ Launching with DAO Maker EdgeMarket has secured a DAO Maker launchpad partnership, aligning with one of Web3’s strongest distribution and community ecosystems. Designed for: • High quality participant onboarding • Long term ecosystem alignment • Structured and credible market entry What $SIGNAL powers: • Liquidity infrastructure on BNB Chain • Market participation and pricing • The bridge between prediction, validation, and settlement • Core infrastructure within the EdgeMarket dual layer architecture EdgeMarket System: 🔶 $SIGNAL on BNB Liquidity • Markets • Settlement 🔵 BETON on TON Validation • Reputation • Truth Consensus How the network evolves: • Markets generate signals • Validators verify outcomes • Reputation strengthens through accuracy • Truth becomes scalable infrastructure No hype driven mechanics. No manipulated narratives. No centralised gatekeepers. Only: Conviction. Validation. Results. 📅 DAO Maker Launchpad — May 30 2026 📅 $SIGNAL TGE — May 30 2026 🌐https://edgemarket.ai/bnb/tokenomics Prediction becomes intelligence. Edge is earned. #EdgeMarket#SIGNAL#DAOmaker#BNBChain#TON#AI#Web3#PredictionMarkets#Crypto#DecentralizedAI#TruthValidation#CollectiveIntelligence#Blockchain#TGE#Launchpad