> > - Change the in-progress code to use static variables instead of > > globals (both the nesting level and the key for the thread dict were > > globals but have no reason to be globals; the key can even be a > > function-static variable in get_inprogress_dict()). > > The "compare_nesting" variable is a bit troublesome long-term -- it will > cause threading issues in a free-threaded implementation. The solution is to > put the value into the thread-state. > > [ not sure if it matters right now, but just bringing it up ] Good point -- especially since the in-progress-dict is already part of the thread state. Jeremy explained to me that the compare_nesting variable is mostly an optimization (avoiding the work with the in-progress-dict when we don't know for sure that it's worth it) but yes, mixing nesting levels (even if the dicts are separate) could cause coupling or interference between threads... --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4