@vpstuijianaaa · Post #23 · 01.11.2021 г., 14:39
#VPN#speed 【已亲测可用,下载速度5M左右,有二十多个国家线路】
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
Пребарај: #speed
@vpstuijianaaa · Post #23 · 01.11.2021 г., 14:39
#VPN#speed 【已亲测可用,下载速度5M左右,有二十多个国家线路】
@TFGames · Post #1825 · 04.01.2024 г., 18:14
#NRO#SPEED#GAMES https://testflight.apple.com/join/Yw3RBuRK
@interesting_planet_facts · Post #1189 · 03.01.2026 г., 22:11
🌎 The peregrine falcon holds the speed record for any animal on Earth. During hunting dives called “stoops,” it can reach over 320 kilometers per hour. This speed helps it catch birds in midair. ✨ #animals⚡#records⚡#speed 👉subscribe Interesting Planet 👉more Channels
@interesting_planet_facts · Post #695 · 05.09.2025 г., 20:22
🌎 The cheetah is the fastest land animal, capable of sprinting up to 112 kilometers per hour for short distances. Its slender body and long tail provide balance while chasing prey across African plains. ✨ #animals⚡#speed⚡#records 👉subscribe Interesting Planet
@wildthemestelegram · Post #1014 · 24.01.2024 г., 12:00
White Car #black #gray #white #car #speed #light ᅠ𝐖𝐢𝐥𝐝 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐓𝐡𝐞𝐦𝐞𝐬 ᅠ═──═⌘═──═ᅠ
@wildthemestelegram · Post #1026 · 26.01.2024 г., 10:00
Orange Car #black #gray #orange #car #dark #night #speed #art ᅠ𝐖𝐢𝐥𝐝 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐓𝐡𝐞𝐦𝐞𝐬 ᅠ═──═⌘═──═ᅠ
@interesting_planet_facts · Post #589 · 19.08.2025 г., 16:22
🌎 Some bamboo species can grow up to 91 centimeters in a single day, making bamboo one of the fastest-growing plants on Earth. This rapid growth helps bamboo quickly regenerate after being harvested and provides vital habitats for many animals. ✨ #botany⚡#speed⚡#ecosystems 👉subscribe Interesting Planet
Hashtags
@wildthemestelegram · Post #969 · 18.01.2024 г., 10:00
Sport Car #black #gray #biege #yellow #road #speed #car ᅠ𝐖𝐢𝐥𝐝 𝐓𝐞𝐥𝐞𝐠𝐫𝐚𝐦 𝐓𝐡𝐞𝐦𝐞𝐬 ᅠ═──═⌘═──═ᅠ
@cosmomyst · Post #222 · 04.09.2025 г., 20:11
🪐 The pulsar PSR J1748−2446ad in the globular cluster Terzan 5 holds the record as the fastest-spinning known pulsar, rotating an astonishing 716 times per second. Pulsars are ultra-dense neutron stars that emit narrow beams of radiation, and this particular cosmic beacon spins so rapidly that its surface moves at about a quarter of the speed of light. ✨ #pulsars⚡#neutronstars⚡#speed⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space 👉subscribe Universe Mysteries
@interesting_planet_facts · Post #524 · 08.08.2025 г., 20:22
🌎 Lightning-fast, the peregrine falcon dives at up to 320 km/h, making it the fastest animal on Earth. Specialized nostrils and strong muscles let it hunt mid-air with pinpoint accuracy. ✨ #falcon⚡#speed⚡#wildlife 👉subscribe Interesting Planet
@Wallpaper_INT · Post #47346 · 20.12.2025 г., 15:35
#Set#Car#Tunnel#Speed#Red#8K @Wallpaper_INT
@Wallpaper_INT · Post #46480 · 28.05.2025 г., 16:30
#Cars#Road#Race#Speed#8K @Wallpaper_INT