This merge request aims to fix the error in issue #1123. The solution was to split the error handling in the stop() function in order to support the multiple calls in the monitor()
function, and to move the profiler.stop()
calls in Monitor from finally to except, in order to avoid finishing the profiling process early.
It also introduces a more comprehensive way to manage the status of the Profiler, using the status class as @bdepaula proposed and deleting the old flags.