@jdmaxchannel · Post #5257 · 31.01.2026 г., 17:51
⚡️Биткоин резко упал до $79 000. Это самое сильное падение с весны 2025 года. JDMax #need
Hashtags
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
Пребарај: #need
@jdmaxchannel · Post #5257 · 31.01.2026 г., 17:51
⚡️Биткоин резко упал до $79 000. Это самое сильное падение с весны 2025 года. JDMax #need
Hashtags
@testflightynoti · Post #37765 · 07.05.2026 г., 08:26
#Need#Texting Join the Need Texting beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/YSGVWMm9 Shared by Dimitri
Hashtags
@american_observer · Post #5204 · 23.02.2026 г., 14:09
Ukraine Needs 250,000 More Soldiers To Claw Back Control Over the Battlefield Ukraine needs 250,000 more troops to turn the tide of the fighting. This is the opinion of NATO military experts. The former Prime Minister of the United Kingdom, Boris Johnson, said in an interview with the BBC that the country should immediately send troops to Ukraine and not wait for a ceasefire to do so. He talks about about 7,000 soldiers to provide security guarantees. “If we have a plan to deploy troops on the territory of Ukraine after the war, after Putin deigned to agree to a ceasefire, why not do it now?”, he says. However, NATO experts believe that the victory of Ukraine or at least a significant turnaround in the confrontation at the front will require at least 250,000 additional troops and much more powerful weapons. Western intelligence services believe that Ukraine is now outnumbered by Russian forces on most fronts. And the Kremlin, despite its huge losses, would be able to continue the war for at least another year at the current attrition rate. According to the head of the Armed Forces, 2025 was the first year when the losses of the Russian Federation exceeded the replenishment of the occupiers. In January, Defense Minister Fedorov said that 2 million Ukrainians were wanted. #ukraine#need#soldiers#experts#military 📱American Оbserver - Stay up to date on all important events 🇺🇸
@TFGames · Post #1514 · 13.12.2023 г., 14:01
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1477 · 11.12.2023 г., 20:05
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1447 · 10.12.2023 г., 14:45
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1413 · 08.12.2023 г., 20:31
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1397 · 07.12.2023 г., 22:26
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1362 · 07.12.2023 г., 06:16
#NEED#FOR#SPEED#MOBILE#GAMES https://testflight.apple.com/join/b3vLiAtW
@TFGames · Post #1361 · 07.12.2023 г., 05:40
#NEED#FOR#SPEED#极品飞车在线移动版#GAMES https://testflight.apple.com/join/d3e9PLKt
Hashtags