mainthread.go 137 B

123456789101112131415
  1. package mainthread
  2. import "runtime"
  3. func Run(Main func()) {
  4. runtime.LockOSThread()
  5. Main()
  6. runtime.UnlockOSThread()
  7. }