mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 18:46:11 +00:00
12 lines
354 B
Go
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) }
|