Go Deadlocks Talk
This is sample code for my Go Deadlocks talk.
Simple
- simple - a super simple deadlock
- simple2 - the same but with an extra Go deadlock detector defeating go routine
File and Directory example
- vfs1 - starting out simply with no locking
- vfs2 - adding locking to cause a deadlock
- vfs3-release-mutex - avoid the deadlock by releasing the mutex
- vfs4-ro-variable - avoid the deadlock with a read only variable
- vfs5-go-deadlock - demonstrate the use of go-deadlock
Channel deadlock
- channel-deadlock - the channel deadlock example
- channel-deadlock-fixed - the fixed example
Read lock
- read-lock - demonstrate recursively taking read locks is a bad idea