Hanchin Hsieh

Blockflare

AKA yuchanns, a developer with a passion for FOSS and a huge fan of LiSA (織部 里沙). The creator and maintainer of the Go Binding for Apache OpenDAL, and an Emeritus contributor to nerdctl. Jump into my memo.


在 Async Python 中进行 CPU 密集型工作

这篇算是书接上文 Python Web 框架中的后台任务,继续讨论在 Python 中如何处理 CPU 密集型工作。

背景

我们组有个 python 服务,里面有一些机器学习的功能,例如人脸识别和 ocr 还有音频分析等。这些任务用到的通常都是阻塞性的 api。现在我是通过 twsited 将它们创建成单独的线程或进程。但是我更想结合最近实践到的 fastapi 和 lifespan 来管理。

Python Web 框架中的后台任务

几个月前在开发一个 Python Web 项目时,我希望能像 Go 项目那样,在 Web 服务启动时就能同时运行一些后台任务。这让我开始寻找 Python 中的最佳实践方案。

Shader Learning Series Part 1: Understanding Ray Marching Rendering

Warning: The following content is generated and summarized by AI. It represents my personal learning journey and thought process. There might be inaccuracies, please use it as a reference with discretion.

Recap of 2024

After a two-year hiatus from writing recaps (I skipped 2023 as there wasn't much to highlight), I'm finally back to share my journey through 2024.

[译] 不止游戏: muvm 中的 X11 桥接

翻译自原文: https://asahilinux.org/2024/12/muvm-x11-bridging/

大家好!我们刚刚在 Asahi Linux 的 x86/x86-64 模拟技术栈上发布了一个非常酷的更新, 我想分享一下我们一直在做的工作. 从今天开始, 非游戏应用程序现在可以使用了!

Loading...