Hey #pyconus, has there been much talk about Python free threading and per interpreter GIL support. I have added support for both in my mod_wsgi module for hosting Python WSGI applications under Apache/httpd. I am interested in connecting with anyone who may want to explore how these features can be used with WSGI applications in a production grade WSGI server setting. Or are these features still not seen as ready for prime time?
@grahamdumpleton are you at the conference? I’ll be at the sprint on Monday, or would come to an open space. would be cool to see Flask on free threading and discuss
@davidism Sorry, no more PyCon US for me. 😭
@davidism FWIW, a Flask hello world app seems to work okay. With single process and 5 threads, over 30000 requests/sec, using about 4 cores (on a 4 performance 6 efficiency cores box). Seen one segfault, so I will need to investigate to see if that is a mod_wsgi issue. Possible that metrics collection mod_wsgi is doing could be blowing up on free threading. Recently add GC metrics and was nervous about whether that would be safe under free threading.
@davidism Confirmed segfault was in mod_wsgi and partly related to metrics collection it does, although not specifically GC metrics. Looks like it may though relate to delayed GC of objects. I was using Python 3.14.4t, which had the GC which got reverted in 3.14.5 so not sure if that contributed. The build I was running with wasn't latest mod_wsgi code though, so I need to make sure I am up to date and see I if can trigger it again.
@davidism Hmmm, not sure that concerns about GC algorithm are right since seems free threaded Python does GC differently than when have GIL. So GC mechanism being reverted probably only applies to when GIL operating.