Retrieve a value within a do block

I’m afraid this method is unusable, and it is somewhat misleading for a new user. The reason is that in my context, the counterpart of run_do_block is Thread.lock. You have no idea what the concrete implementation of Thread.lock is—for example, it can return nothing—e.g.

julia> function run_do_block(f) # the concrete code implementation is entailed for proper inference
           f()
           return nothing
       end;

julia> cut = run_do_block() do # Here cut = the UPPER "return", not THIS "return"
           cut = 1
           return cut
       end;

julia> isnothing(cut) # it depends on the concrete code implementation of `run_do_block`
true

A related post.