GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||
GeezerVison is showing github.com — gh-121621: Move asyncio freelist to thread state by Fidget-Spinner · Pull Request #121915 · python/cpython Conversation
|
| static inline void | ||
| _PyAsyncModule_ClearFreeLists(struct _Py_object_freelists *freelists, int is_finalization) | ||
| { | ||
| #ifdef WITH_FREELISTS |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Does anyone with better freelist internals knowledge know why this happens:
When I remove this function's body, the refleak tests pass. Otherwise they currently fail.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| extern void _PyObjectStackChunk_ClearFreeList(struct _Py_object_freelists *freelists, int is_finalization); | ||
|
|
||
| // Keep in sync with _asynciomodule.c ! | ||
| typedef struct futureiterobject_dummy { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
As mentioned by Sam we should try to find a way to avoid this.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If we go with #121934, then that will make the asyncio freelist implementation a lot easier and will avoid a lot of these warts.
Maybe, in the meantime, we should just disable the freelist in the free-threaded build? That would be a much smaller change and wouldn't introduce duplicate types.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We could backport the disabling of freelist in the free-threaded build to 3.13 to fix the race conditions.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.