We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0edeaf6 commit c7ee310Copy full SHA for c7ee310
src/internal/task/pmutex-cooperative.go
@@ -0,0 +1,16 @@
1
+package task
2
+
3
+// PMutex is a real mutex on systems that can be either preemptive or threaded,
4
+// and a dummy lock on other (purely cooperative) systems.
5
+//
6
+// It is mainly useful for short operations that need a lock when threading may
7
+// be involved, but which do not need a lock with a purely cooperative
8
+// scheduler.
9
+type PMutex struct {
10
+}
11
12
+func (m *PMutex) Lock() {
13
14
15
+func (m *PMutex) Unlock() {
16
0 commit comments