@Aetatesolis · Post #4039 · 21.03.2025 г., 13:37
The Lord of the Rings 🎨 Darrell K. Sweet (🇺🇸, 1934-2011) #tolkien #lotr AETATESOLIS
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
Пребарај: #tolkien
@Aetatesolis · Post #4039 · 21.03.2025 г., 13:37
The Lord of the Rings 🎨 Darrell K. Sweet (🇺🇸, 1934-2011) #tolkien #lotr AETATESOLIS
@Aetatesolis · Post #4033 · 21.03.2025 г., 12:36
The Lord of the Rings 🎨 Darrell K. Sweet (🇺🇸, 1934-2011) Sweet was best known for providing cover art for science fiction and fantasy novels, in which capacity he was nominated for a Hugo Award in 1983. #tolkien #lotr AETATESOLIS
@Aetatesolis · Post #3779 · 13.01.2025 г., 12:46
The Lord of the Rings 🎨 Tim Kirk (🇺🇸, 1947 - ...) Art for the 1975 Tolkien Calendar. #lotr#tolkien AETATESOLIS
@filosofarsogood · Post #11933 · 07.10.2024 г., 10:02
Enrico Gamba, in arte 151eg, cogita sulla Favola moderna, tra #DISNEY, #MIYAZAKI e #TOLKIEN: simbolismo, significato ed educazione, in una Cogitata stupenda! https://youtu.be/RmrW2ueDqCI
@sarconsulurals · Post #2976 · 03.01.2026 г., 04:16
🗓January 3 marks the birth of J.R.R. Tolkien (1892-1973), the legendary author of The Lord of the Rings and The Hobbit. 📍 He was born in Bloemfontein, now the capital of South Africa’s Free State province and the country’s judicial capital 🇿🇦📚 👨💼 Tolkien’s father, Arthur Tolkien, worked as a banker and was transferred from the United Kingdom to Bloemfontein for career advancement. The family’s African servants considered baby John exceptionally handsome and admired him greatly. 👶 On one occasion, a servant named Isaak took the infant Tolkien to his kraal for the night to introduce him to his family. Years later, he named his first son Isaak Mister Tolkien Victor in the child’s honor. ✈️ When Tolkien was three, he traveled to England with his mother Mabel and younger brother Hilary. During their stay, Arthur Tolkien died in Bloemfontein from acute rheumatic fever. The family never returned to South Africa after his death. 🧠 Tolkien later said he remembered very little of his early years in South Africa. Biographers note that he retained a few words of Afrikaans, though he was not fluent. 🏨 Today, Bloemfontein proudly highlights its link to Tolkien. The four-star Hobbit Boutique Hotel promotes itself as his birthplace, features a commemorative plaque, and names all its rooms after characters from The Lord of the Rings and The Hobbit. #Literature#Books#History#Tolkien#SouthAfrica#Africa
@Aetatesolis · Post #3798 · 21.01.2025 г., 17:32
Der Berggeist 🎨 Josef Madlener (🇩🇪, 1881-1967) Der Berggeist is "The Mountain Spirit". According to Carpenter, Tolkien bought the postcard during his trip to Europe. The envelope containing it was later found with the inscription: "Origin of Gandalf". However, the picture was painted about 1925-1930 and if I remember correctly the postcard was published 1935 in a folder with three or four other pictures. So the postcard must come by another way into Tolkien's hands. #tolkien#gandalf #lotr Source AETATESOLIS
@dreamsgallerys · Post #2282 · 23.04.2024 г., 09:36
by Rene Gross #арт#art#some#gross#lotr#baraddur#fantasy#tolkien#landscape Dreams Gallery
@dreamsgallerys · Post #2227 · 20.03.2024 г., 14:30
Ещё один любимый персонаж By Voodoont #voodoont #ai#арт#art#girl#elf#city#arwen#liv_tyler#tolkien#Middle_earth#old_work#lotr Dreams Gallery