cloud-game/pkg/thread/thread_darwin.go
sergystepanov e53cf45fa7
Main thread lock refactoring (#367)
Use slim main thread locking function for macOS instead of a lib.
2022-06-12 13:39:23 +03:00

10 lines
311 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) }