Skip to content
Snippets Groups Projects
  1. Oct 02, 2019
    • akuesters's avatar
      Python wrapper: thread safe recipe (#882) · f30c4204
      akuesters authored and Benjamin Cumming's avatar Benjamin Cumming committed
      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
      f30c4204