Skip to content

docs: project examples (Bengal)#318

Open
lbliii wants to merge 2 commits intoQuansight-Labs:mainfrom
lbliii:llane/bengal-free-threading-projects
Open

docs: project examples (Bengal)#318
lbliii wants to merge 2 commits intoQuansight-Labs:mainfrom
lbliii:llane/bengal-free-threading-projects

Conversation

@lbliii
Copy link

@lbliii lbliii commented Mar 1, 2026

Hello! Your contribution guide invites external examples, so I thought I'd share a set of pure-Python libraries I've been building on 3.14t over the past several months.

They're all part of an SSG stack (Bengal) and each one exercises a different free-threading pattern: ContextVar request isolation (Chirp), copy-on-write filter chains with a PEP 703 declaration (Kida), thread-based ASGI workers (Pounce), immutable ASTs for parallel parsing (Patitas), and immutable state machines (Rosettes).

Let me know if you'd like a different format or for me to reduce the list to just one. These link to the repos and doc sites -- I don't have dedicated blog posts about them but could look into that if recommended.

Thanks for taking a look.

Links added in PR are below:

Signed-off-by: Lawrence Lane <llane@nvidia.com>
Copy link
Collaborator

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bengal looks really neat! I will definitely point to this as an example for other people to look at when they ask me about free-threaded "apps".

If you ever notice any scaling issues or want help tracking them down, IMO fixing issues like that is will within our remit at Quansight, especially if it leads to ecosystem-wide improvements in CPython or core libraries.

@rgommers would you please also give this a look? Let me know if you see any issues with including a section on @lbliii's work.

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
@nascheme
Copy link
Collaborator

nascheme commented Mar 5, 2026

I think pointing to Pounce or Chirp as examples is likely more helpful. So I suggest moving Bengal lower down in the list. If possible, a link to a document that explains how Bengal uses free-threading. It's a bit hard to find your way from the repo README page to relevant documentation.

There is this page in the docs:
https://lbliii.github.io/bengal/docs/building/performance/ but it's more targeted to people using the app vs someone who wants to build something. There is also a note on https://lbliii.github.io/bengal/docs/building/performance/large-sites/ for free-threading.

For Chirp, there is this page: https://lbliii.github.io/chirp/docs/about/thread-safety/

Another idea: you could make a "How does the Bengal stack use free-threading" page, link to that. From there, you could link to the various components and explain how they take advantage of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants