torch::deploy (multipy for non-torch uses) is a system that lets you get around the GIL problem by running multiple Python interpreters in a single C++ process.
Other
173
stars
35
forks
source link
Back out "Convert multipy embedded library exceptions to specific exception type" #320
In deploy, we do dlopen to link the .so each time when we create interpreter. So when interpreter manager is out of scope, we dlclose so we no longer have any symbols in the interpreter .so lib https://fburl.com/code/wlcp3r9o.
If we throw a custom exception class that defined in interpreter .so, then in the catch block, if interpreter manager goes out of scope, we don't recognize this exception class anymore and lead to a crash.
Summary: Original commit changeset: 9cb3d1f17f54
Original Phabricator Diff: D44477860
In deploy, we do dlopen to link the .so each time when we create interpreter. So when interpreter manager is out of scope, we dlclose so we no longer have any symbols in the interpreter .so lib https://fburl.com/code/wlcp3r9o.
If we throw a custom exception class that defined in interpreter .so, then in the catch block, if interpreter manager goes out of scope, we don't recognize this exception class anymore and lead to a crash.
Differential Revision: D45629261