[v2, linux] Improve switching to main thread for callbacks#1392
Conversation
|
Thanks for looking at this 👍 It looks fine to me. One thing I am starting to see is duplication between the different platform frontends and am wondering if we should think about moving some things to a common base... or whether that will bite us in the end :-) |
|
Thanks for looking into the PR.
Yeah absolutely would be great to reduce those duplications 👍 . |
56dce16 to
23e84b8
Compare
|
What do we need to get this out of draft? 😄 |
|
Not much, basically just changing the return values to void for those native methods. I'll try to clean that up during the next couple of days |
c87d1fe to
c3b5426
Compare
Make sure no pointers to the stack are passed to g_idle_add, because at the time the callback gets executed on the main thread, the pointer might be invalid. Go might have reused the stack or grown the stack and the pointer is invalid. The concept used on Windows has been ported to Linux.
c3b5426 to
6ddc13f
Compare
|
Looks great! Thanks for doing this. Let's see if this helps #1321 |
Make sure no pointers to the stack are passed to g_idle_add,
because at the time the callback gets executed on the
main thread, the pointer might be invalid.
Go might have reused the stack or grown the stack and the
pointer is invalid.
The concept used on Windows has been ported to Linux.
Potential fix for #1321