was_interrupted Function

public function was_interrupted() result(interrupted)

Arguments

None

Return Value logical(kind=logical32)


Calls

proc~~was_interrupted~~CallsGraph proc~was_interrupted was_interrupted interface~c_get_interrupted_flag c_get_interrupted_flag proc~was_interrupted->interface~c_get_interrupted_flag log_warning log_warning proc~was_interrupted->log_warning

Source Code

    function was_interrupted() result(interrupted)
        implicit none
        logical(logical32) :: interrupted

        if (c_get_interrupted_flag() /= 0) then
            interrupted = .true.
            call global_logger%log_warning(message="Program interrupted by user.")
        else
            interrupted = .false.
        end if
    end function was_interrupted