go/dashboard/builder/filemutex_local.go
Dmitriy Vyukov d2a9e7164e dashboard: builder changes for performance dashboard
This CL moves code from code.google.com/p/dvyukov-go-perf-dashboard,
which was previously reviewed.

LGTM=adg
R=adg
CC=golang-codereviews
https://golang.org/cl/95190043
2014-05-13 11:00:11 +04:00

28 lines
641 B
Go

// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build netbsd openbsd plan9
package main
import (
"log"
"sync"
)
// FileMutex is similar to sync.RWMutex, but also synchronizes across processes.
// This implementation is a fallback that does not actually provide inter-process synchronization.
type FileMutex struct {
sync.RWMutex
}
func MakeFileMutex(filename string) *FileMutex {
return &FileMutex{}
}
func init() {
log.Printf("WARNING: using fake file mutex." +
" Don't run more than one of these at once!!!")
}