Fix sessionpool comments.

This commit is contained in:
Mikkel Krautz 2011-05-14 11:45:19 +02:00
parent 6e5f24924f
commit 2b20d7a555

View file

@ -32,7 +32,6 @@ func New() (pool *SessionPool) {
// the SessionPool checks whether the ID being reclaimed // the SessionPool checks whether the ID being reclaimed
// is in its list of used IDs. If this is not the case, // is in its list of used IDs. If this is not the case,
// the program will panic. // the program will panic.
// panic.
func (pool *SessionPool) EnableUseTracking() { func (pool *SessionPool) EnableUseTracking() {
if len(pool.unused) != 0 || pool.cur != 0 { if len(pool.unused) != 0 || pool.cur != 0 {
panic("Attempt to enable use tracking on an existing SessionPool.") panic("Attempt to enable use tracking on an existing SessionPool.")
@ -41,7 +40,7 @@ func (pool *SessionPool) EnableUseTracking() {
} }
// Get a new session ID from the SessionPool. // Get a new session ID from the SessionPool.
// Must be reclaimed using Reclaim() when done. // Must be reclaimed using Reclaim() when done using it.
func (pool *SessionPool) Get() (id uint32) { func (pool *SessionPool) Get() (id uint32) {
pool.mutex.Lock() pool.mutex.Lock()
defer pool.mutex.Unlock() defer pool.mutex.Unlock()