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-133171: Make the executor_list thread-safe by aisk · Pull Request #140038 · python/cpython Conversation
|
|
In theory, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I am not sure if making executor_list operations thread-safe at this point is good idea. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@corona10 we need the executor list to be thread safe for it to work with the plan here #133171 (comment). @aisk could you resume the PR please? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| void | ||
| _Py_Executors_InvalidateAll(PyInterpreterState *interp, int is_invalidation) | ||
| { | ||
| EXECUTOR_LIST_LOCK(interp); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This should be a stop the world event.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| /* Clearing an executor can deallocate others, so we need to make a list of | ||
| * executors to invalidate first */ | ||
| EXECUTOR_LIST_LOCK(interp); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is fine. nice.!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I will try to re review this PR in this weekend. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Share the DM context between @Fidget-Spinner and I. Before merging this PR, we should investigate the current blocker #133171 (comment) to verify this PR in practice. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hi @ZeroIntensity @corona10 @Fidget-Spinner , thanks for the review and feedback. I'll bring this PR up to date while waiting for #133171 (comment) to be resolved. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /* Release the lock before calling _Py_ClearExecutorDeletionList | ||
| * to avoid deadlock, since it also tries to acquire the same lock */ | ||
| EXECUTOR_LIST_UNLOCK(interp); | ||
| _Py_ClearExecutorDeletionList(interp); | ||
| EXECUTOR_LIST_LOCK(interp); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, now that I think about it, locking isn't the right choice here. We should instead move the executor list to tstate. Really sorry for taking up your time! |
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.