File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -59,3 +59,4 @@ go run . -module closingchannels
59
59
* [ 37 - Waitgroups] ( waitgroups.go )
60
60
* [ 38 - Rate Limiting] ( ratelimiting/main.go )
61
61
* [ 39 - Atomic Counters] ( atomiccounters/main.go )
62
+ * [ 40 - Mutexes] ( mutexes/main.go )
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import (
42
42
"github.com/symonk/learning-golang/variables"
43
43
"github.com/symonk/learning-golang/waitgroups"
44
44
"github.com/symonk/learning-golang/workerpools"
45
+ "github.com/symonk/learning-golang/mutexes"
45
46
)
46
47
47
48
func main () {
@@ -108,5 +109,6 @@ func buildMap() map[string]func() {
108
109
fnMap ["waitgroups" ] = waitgroups .Run
109
110
fnMap ["ratelimiting" ] = ratelimiting .Run
110
111
fnMap ["atomiccounters" ] = atomiccounters .Run
112
+ fnMap ["mutexes" ] = mutexes .Run
111
113
return fnMap
112
114
}
Original file line number Diff line number Diff line change 1
1
package mutexes
2
2
3
+ // Allows for more complex state synchronisation
4
+ // Across multiple goroutines where atomic/counters
5
+ // are not enough.
3
6
func Run () {}
You can’t perform that action at this time.
0 commit comments