A lightweight mechanism to provide an *instant kickstart* to a Go web server instance upon changing any Go source files under the project directory (and its subdirectories).

race.go 608B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2012 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build darwin,race linux,race freebsd,race
  5. package unix
  6. import (
  7. "runtime"
  8. "unsafe"
  9. )
  10. const raceenabled = true
  11. func raceAcquire(addr unsafe.Pointer) {
  12. runtime.RaceAcquire(addr)
  13. }
  14. func raceReleaseMerge(addr unsafe.Pointer) {
  15. runtime.RaceReleaseMerge(addr)
  16. }
  17. func raceReadRange(addr unsafe.Pointer, len int) {
  18. runtime.RaceReadRange(addr, len)
  19. }
  20. func raceWriteRange(addr unsafe.Pointer, len int) {
  21. runtime.RaceWriteRange(addr, len)
  22. }