You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (mgr *Manager) Run() currently does not return, instead, it calls func (mgr *Manager) Terminate() which in turn calls os.Exit(). I was trying to embed the worker logic with my own goroutines, and defers are required for various operations, but os.Exit() breaks them.
Is there any specific reason why Run() does not return? If not, can we change it to return, or at least make it configurable to do so?
The text was updated successfully, but these errors were encountered:
I envisioned fwg as a framework which controls the process, not a library where you control the process. It installs signal handlers and makes other such global Process changes.
I don't want to make it configurable but I can see a possible new Start API which Run calls that does what you need. You could choose to call it instead.
func (mgr *Manager) Run()
currently does not return, instead, it callsfunc (mgr *Manager) Terminate()
which in turn callsos.Exit()
. I was trying to embed the worker logic with my own goroutines, anddefer
s are required for various operations, butos.Exit()
breaks them.Is there any specific reason why
Run()
does not return? If not, can we change it to return, or at least make it configurable to do so?The text was updated successfully, but these errors were encountered: