Description
Hello again,
I was curious if there was a way to exit the gui thread from a separate thread? Since the "main" thread is stuck in the C loop the bulk of the application is running in one or more goroutines. However if something happens and the app needs to exit, the best I can do is tell the user, and when the other goroutines quit/exit/return the main loop gets stuck and cannot exit without user intervention (the rest of the app being "dead" at this point).
A workaround is to call os.Exit after some delay to allow defered functions in the other goroutines a chance to run, but that doesn't seem very good. I'm using lxn/walk for the Windows version and it has a Synchronize function https://godoc.org/github.com/lxn/walk#WindowBase.Synchronize to call funcs from the main thread/goroutine, is something like this possible? Thanks
Activity