Closed anacrolix closed 1 week ago
Changes applied.
Thanks for looking at this. I have tested and it does not seem to reliably work on completing the example code. Any thoughts on this?
[anacrolix-master] ><> go run .
Requesting quit
Finished quitting
andy@Fyreball /Users/andy/Code/Fyne/systray/example 7s [8:55AM]
[anacrolix-master] ><> go run .
Requesting quit
andy@Fyreball /Users/andy/Code/Fyne/systray/example 7s [8:55AM]
[anacrolix-master] ><>
Yes, the quit is issued asynchronously, and main can exit before the quit handler completes. The correct behaviour is to report quitting after systray.Run returns. I've updated the example to make it deterministic in this respect.
Hello, were you able to test/confirm this?
quit is issued asynchronously, and main can exit before the quit handler completes.
Doesn't this seem problematic? We need to know that the handlers all complete. (for compatibility if nothing else surely?)
I think you misunderstand. I fixed the code so that it always reports completion, where previously it raced.
Cheers
On Darwin, quitting the systray terminates the current process. That's always been a pain. This stops the event loop, and systray.Run should return after calling systray.Quit.