Hacker News new | ask | show | jobs
by ygnasygnoimqwb 749 days ago
> runtime.LockOSThread()

> https://github.com/roblillack/spot/blob/main/ui/init_fltk.go...

Does this imply GOMAXPROCS needs to be set to at least 2?

1 comments

No, it just means that the main goroutine should not be moved onto another OS thread to ensure that it is always the same OS thread which will run UI updates.

This is necessary for most UI libraries and in Spot's case implemented for both the FLTK and the Cocoa backend.