Python wrapper: thread safe recipe (#882)
Ensure that errors in Python callbacks that are called from multithreaded C++ code propogate the correct Python error back to the parent Python callback site, and that no callbacks are called from other threads if an error has already ocurred. - protects each recipe callback with a mutex, stores python exception, catches and throws python exception if occured - methods calling recipe (in simulation and partition_load_balance) are protected as well by try catch, resets and rethrows python exception (if occured) or else throws C++ exception fixes #792
Showing
- python/CMakeLists.txt 1 addition, 0 deletionspython/CMakeLists.txt
- python/domain_decomposition.cpp 8 additions, 1 deletionpython/domain_decomposition.cpp
- python/error.cpp 18 additions, 0 deletionspython/error.cpp
- python/error.hpp 26 additions, 0 deletionspython/error.hpp
- python/recipe.cpp 9 additions, 7 deletionspython/recipe.cpp
- python/recipe.hpp 12 additions, 10 deletionspython/recipe.hpp
- python/simulation.cpp 7 additions, 1 deletionpython/simulation.cpp
Please register or sign in to comment