There is also a great wiki article on how to execute functions on the main
thread from multiple goroutines. It helped me a lot when I did some GUI
development experiments.
https://github.com/golang/go/wiki/LockOSThread
--
You received this message because you are subscribed to the Google Groups
On Fri, Sep 9, 2016 at 10:51 AM, Alex Flint wrote:
> I am using cgo to wrap a library that creates an OSX UI, which requires
> things to be run on the "main thread". Sometimes my cgo calls end up on the
> main thread and sometimes they do not (I check this with [NSThread
> isMainThread]). I unders
I am using cgo to wrap a library that creates an OSX UI, which requires
things to be run on the "main thread". Sometimes my cgo calls end up on the
main thread and sometimes they do not (I check this with [NSThread
isMainThread]). I understand that cgo threads are guaranteed to run on an
OS-allocat