@arch_shovel · Post #383 · 12.06.2022 г., 15:15
Rossana Orlandi at Fuorisalone in 10 images. Location: Milan. Photo Marco Menghi #rossanaorlandi#designweek#milandesignweek#arch_shovel
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
Пребарај: #designweek
@arch_shovel · Post #383 · 12.06.2022 г., 15:15
Rossana Orlandi at Fuorisalone in 10 images. Location: Milan. Photo Marco Menghi #rossanaorlandi#designweek#milandesignweek#arch_shovel
@arch_shovel · Post #838 · 24.11.2022 г., 17:21
8 Architectural Installations at Dubai Design Week 2022 This year’s program is focused on designing a sustainable future. To promote this, Dubai Design Week has invited international and regional architects and designers to create installations that demonstrate creative design thinking, to introduce innovative materials, and spark conversations about the ways in which design can have a positive impact on the environment. 1. Once Upon a Forest / OBMI 2. How Much Does Your Debris Weigh? / Quartz Architects 3. IOTA / Karim Tamerji and Elias El Hage 4. Grounded in Hope / Grounded Design 5. Seven Cypresses (Seven SARV) / Banafsheh Hemmati 6. Suhail Design / Reem Al Bustani 7. KIN / FADAA 8. Al Gargoor / Sara Alrayyes #arch_shovel#designweek#dubai#architecture#installation
@arch_shovel · Post #374 · 12.06.2022 г., 11:05
Nine design pieces from the Salone del Mobile 2022. 1. Biomorphic, The value of research for De Castelli. 2. Ixa, Foster+Partners for Artemide. 3. Loop, India Mahdavi for Gebrüder Thonet Vienna. 4. Riace, Ronan & Erwan Bouroullec for Magis. 5. Design Re-Generation. Università Statale di Milano, Via Festa del Perdono 7. 6. La Manufacture. Museo Poldi Pezzoli, Via Manzoni 12, Milan. 7. Tom Dixon, Twenty. Palazzo Serbelloni, corso Venezia 14. 8. Montbook, Giulio Iacchetti. Temporary Shop, via Palermo 18, Milan. 9. Again from the Earth’s Foundation. Fondazione Giangiacomo Feltrinelli, Via Pasubio 5, Milan. Photo Marco Menghi More on domusweb.it #designweek#milandesignweek#salonedelmobile#arch_shovel#milano
@arch_shovel · Post #393 · 12.06.2022 г., 18:20
The most Instagrammable installation of Milano Design Week 2022. During Milan design week, designer Daniel Arsham teamed with bathroom and kitchen manufacturer Kohler to create a walking interpretation of a "sink" at a Baroque mansion. The piece, dubbed Divided Layers, is made up of seven stacked white panels that form a tunnel that is entered through a platform flanked by a water feature. #milandesignweek#milan#designweek#danielarsham#arch_shovel