llm_windows.go 783 B

12345678910111213141516171819202122
  1. package llm
  2. import (
  3. "syscall"
  4. )
  5. const (
  6. CREATE_DEFAULT_ERROR_MODE = 0x04000000
  7. ABOVE_NORMAL_PRIORITY_CLASS = 0x00008000
  8. )
  9. var LlamaServerSysProcAttr = &syscall.SysProcAttr{
  10. // Wire up the default error handling logic If for some reason a DLL is
  11. // missing in the path this will pop up a GUI Dialog explaining the fault so
  12. // the user can either fix their PATH, or report a bug. Without this
  13. // setting, the process exits immediately with a generic exit status but no
  14. // way to (easily) figure out what the actual missing DLL was.
  15. //
  16. // Setting Above Normal priority class ensures when running as a "background service"
  17. // with "programs" given best priority, we aren't starved of cpu cycles
  18. CreationFlags: CREATE_DEFAULT_ERROR_MODE | ABOVE_NORMAL_PRIORITY_CLASS,
  19. }