mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
gh-133485: Use interpreters.Interpreter in InterpreterPoolExecutor (gh-133957)
Most importantly, this resolves the issues with functions and types defined in __main__. It also expands the number of supported objects and simplifies the implementation.
This commit is contained in:
parent
15f2bac02c
commit
725da50520
5 changed files with 266 additions and 205 deletions
|
|
@ -674,7 +674,9 @@ _PyPickle_Loads(struct _unpickle_context *ctx, PyObject *pickled)
|
|||
|
||||
finally:
|
||||
if (exc != NULL) {
|
||||
sync_module_capture_exc(tstate, &ctx->main);
|
||||
if (_PyErr_Occurred(tstate)) {
|
||||
sync_module_capture_exc(tstate, &ctx->main);
|
||||
}
|
||||
// We restore the original exception.
|
||||
// It might make sense to chain it (__context__).
|
||||
_PyErr_SetRaisedException(tstate, exc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue