code: func (m *MemoryBackend) Close(timeout time.Duration) bool {
  	// acquire global mutex
  	m.globalMutex.Lock()
  
  	// set closing
  	m.closing = true
  
  	// prepare list
  	var clients []*Client
  
  	// close temporary sessions
  	for _, sess := range m.temporarySessions {
  		sess.owner.Close()
  		clients = append(clients, sess.owner)
  	}
  
  	// closed owned stored sessions
  	for _, sess := range m.storedSessions {
  		if sess.owner != nil {
  			sess.owner.Close()
  			clients = append(clients, sess.owner)
  		}
  	}
  
  	// release mutex to allow termination
  	m.globalMutex.Unlock()
  
  	// return early if empty
  	if len(clients) == 0 {
  		return true
  	}
  
  	// prepare timeout
  	tm := time.After(timeout)
  
  	// wait for clients to close
  	for _, client := range clients {
  		select {
  		case <-client.Closed():
  			continue
  		case <-tm:
  			return false
  		}
  	}
  
  	return true
  }
docs: // Close will close all active clients and close the backend. The return value
  // denotes if the timeout has been reached.