aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/internal/task/pmutex-cooperative.go
blob: ae2aa4bad83f9a01382ae29a21ae1e65e8f697c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package task

// PMutex is a real mutex on systems that can be either preemptive or threaded,
// and a dummy lock on other (purely cooperative) systems.
//
// It is mainly useful for short operations that need a lock when threading may
// be involved, but which do not need a lock with a purely cooperative
// scheduler.
type PMutex struct {
}

func (m *PMutex) Lock() {
}

func (m *PMutex) Unlock() {
}