mirror of
https://github.com/safing/portbase
synced 2025-04-17 16:09:08 +00:00
Add TODO to improve module worker context
This commit is contained in:
parent
6a7dea876b
commit
1ae8c0698e
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue