-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signal exceptions in the worker to the master process in the simplema…
…pper skeleton. Add test to cover exception handling in the workers for this case.
- Loading branch information
Roberto Di Cosmo
committed
May 2, 2021
1 parent
ba9a613
commit f140dbc
Showing
3 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
(**************************************************************************) | ||
(* Sample use of Parmap, a simple library to perform Map computations on *) | ||
(* a multi-core *) | ||
(* *) | ||
(* Author(s): Roberto Di Cosmo *) | ||
(* *) | ||
(* This program is free software: you can redistribute it and/or modify *) | ||
(* it under the terms of the GNU General Public License as *) | ||
(* published by the Free Software Foundation, either version 2 of the *) | ||
(* License, or (at your option) any later version. *) | ||
(**************************************************************************) | ||
|
||
Printf.eprintf "Testing capture of exception: this code should exit normally, without segfault.\n%!";; | ||
|
||
Parmap.debugging true;; | ||
|
||
let _ = | ||
try | ||
Parmap.parmap | ||
(function x -> | ||
failwith "should not crash") | ||
(Parmap.L [1;2;3;4;5]) | ||
with _ -> (Printf.printf "Exceptions are properly catched, no SIGSEV"; exit 0) | ||
|
||
|
||
|