Finalize for modules?

You can add an atexit hook which is called when Julia shuts down.

Note that, for this specific example, MPI.Init() adds this hook by default for you, see MPI.jl/src/environment.jl.

3 Likes