aboutsummaryrefslogtreecommitdiff
path: root/dashboard/cmd/builder/filemutex_local.go
blob: 68cfb62f3ba178290d88d576c4116f194344acf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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 nacl plan9 solaris

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!!!")
}