Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type M ¶
type M struct {
// contains filtered or unexported fields
}
Think of this as an infinite number of named bathroom stalls. Each named stall can only be occupied by one person. When you TryLock(): a) it won't open if it's already occupied. (because it's locked inside) decide to do something else b) it opens and you get in and the stall gets reserved/locked for you. When you get out
you call the unlock callback you obtained from TryLock() to return the stall for use.
Click to show internal directories.
Click to hide internal directories.