func DeferTerminationCleanupFunction(wg *sync.WaitGroup, ch <-chan struct{}, f func())
DeferTerminationCleanupFunction will execute the given function `f` when the
channel `ch` is closed.
The given waitGroup will be added with a delta +1 and once the function
`f` returns from its execution that same waitGroup will signalize function
`f` is completed.