[PPL-devel] [GIT] ppl/ppl(devel): Improved thread-safety for the mechanism for abandoning expensive computations .

Enea Zaffanella zaffanella at cs.unipr.it
Thu Oct 6 15:10:07 CEST 2016


Module: ppl/ppl
Branch: devel
Commit: ff54802bc0227620b61c7f840a4b51705c2b3dd0
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=ff54802bc0227620b61c7f840a4b51705c2b3dd0

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Thu Oct  6 15:02:00 2016 +0200

Improved thread-safety for the mechanism for abandoning expensive computations.

Added helper make_interruptible() to allow for the creation of threads
executing PPL-related computations that can be interrupted.
Note: it is up to the library user to do what is needed in order to
propagate the exceptions from the (interrupted) worker thread to the
(interrupting) master thread. See tests/Polyhedron/threadsafe2.cc
for an example.

Note: the mechanism is only available in the C++ interface.

---

 interfaces/C/ppl_c_implementation_common.cc |   19 ++++-
 interfaces/Java/jni/ppl_java_common.cc      |    6 ++
 interfaces/Java/jni/ppl_java_globals.cc     |   27 ++++++
 src/Makefile.am                             |    1 +
 src/globals.cc                              |    5 +-
 src/globals_defs.hh                         |   16 ++++-
 src/make_threadable.cc                      |   79 ++++++++++++++++++
 src/make_threadable.hh                      |   81 ++++++++++++++++--
 tests/Polyhedron/Makefile.am                |    4 +-
 tests/Polyhedron/threadsafe2.cc             |  118 +++++++++++++++++++++++++++
 10 files changed, 342 insertions(+), 14 deletions(-)

Diff:   http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commitdiff;h=ff54802bc0227620b61c7f840a4b51705c2b3dd0



More information about the PPL-devel mailing list