/// Helper to call `MPI_ABORT` if a panic occurs inside the continuation,
/// *after* allowing the panic implementation to unwind back out.
///
/// This will be completely ineffective if the panic implementation does not unwind.
Helper to call `MPI_ABORT` if a panic occurs inside the continuation,
after* allowing the panic implementation to unwind back out.

This will be completely ineffective if the panic implementation does not unwind.
Helper to call ` MPI_ABORT ` if a panic occurs inside the continuation after * allowing the panic implementation to unwind back out . This will be completely ineffective if the panic implementation does not unwind .
pub fn with_mpi_abort_on_unwind<R>(func: impl std::panic::UnwindSafe + FnOnce() -> R) -> R {
    use crate::mpi::{AsCommunicator, Communicator};
    with_default_root(|root| {
        let res = std::panic::catch_unwind(func);
        match res {
            Ok(r) => return r,
            Err(_payload) => {
                // we won't need to worry about printing a message, under the assumption
                // that the panic hook already did so before beginning to unwind.
                root.as_communicator().abort(1);
            },
        }
    })
}
pub fn with_mpi_abort_on_unwind < R > ( func : impl std :: panic :: UnwindSafe + FnOnce ( ) -> R ) -> R { use crate :: mpi :: { AsCommunicator , Communicator } ; with_default_root ( | root | { let res = std :: panic :: catch_unwind ( func ) ; match res { Ok ( r ) => return r , Err ( _payload ) => { // we won't need to worry about printing a message, under the assumption // that the panic hook already did so before beginning to unwind. root . as_communicator ( ) . abort ( 1 ) ; } , } } ) }
Helper to call `MPI_ABORT` if a panic occurs inside the continuation,
after* allowing the panic implementation to unwind back out.
Helper to call ` MPI_ABORT ` if a panic occurs inside the continuation after * allowing the panic implementation to unwind back out .
func
impl std::panic::UnwindSafe + FnOnce() -> R