Add TODO to improve module worker context

This commit is contained in:
Daniel 2023-04-06 14:34:46 +02:00
parent 6a7dea876b
commit 1ae8c0698e

View file

@ -125,6 +125,8 @@ func (m *Module) runWorker(name string, fn func(context.Context) error) (err err
}()
// run
// TODO: get cancel func for worker context and cancel when worker is done.
// This ensure that when the worker passes its context to another (async) function, it will also be shutdown when the worker finished or dies.
err = fn(m.Ctx)
return
}