Documentation ¶
Overview ¶
Package locker is a simple package to manage named ReadWrite mutexes. These appear to be especially useful for synchronizing access to session based information in web applications.
The common use case is to use the package level functions, which use a package level set of locks (safe to use from multiple goroutines simultaneously). However, you may also create a new separate set of locks.
All locks are implemented with read-write mutexes. To use them like a regular mutex, simply ignore the RLock/RUnlock functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Notes ¶
Bugs ¶
The locker here can grow without bound in long running programs. Since it's intended to be used in web applications, this is a major problem. Figure out a way to keep the locker lean.