Disable fork join when one of the tasks complete

In reply to dave_59:

What for the begin and end inside the fork?
As I said this code is a part of the monitor, that’s why the forever loop.
Shouldn’t I use forever loop?