cloud-game/pkg/worker/thread/thread_darwin.go
Sergey Stepanov 9b56ffc87c
Fix macOS tests
Main thread locking hangs OpenGL emulators.
2024-05-07 21:05:12 +03:00

12 lines
354 B
Go

// This package used for locking goroutines to
// the main OS thread.
// See: https://github.com/golang/go/wiki/LockOSThread
package thread
// Wrap enables functions to be executed in the main thread.
func Wrap(f func()) { Run(f) }
// Main calls a function on the main thread.
func Main(f func()) { Call(f) }
func SwitchGraphics(s bool) { Switch(s) }