Closed gysddn closed 1 month ago
Yep, it's probably a similar rule as MacOS where you can't manipulate GUI objects outside the main thread. Unload()
should be called inside of a desktop.Dispatch
if called from a goroutine.
Oh, I see. That makes sense 👍🏻
I did update my example with desktop.Dispatch
and that did the trick.
Sure enough, it is stated here as well: https://github.com/linuxmint/gtk/blob/master/gdk/gdk.c#L470
Unload works when it's used in the same thread, but when I try to test in a
goroutine
crashes.The test case:
The output:
Happens both on
main
andpurego
branches.