code: func (m *TryMutex) TryLock(timeout time.Duration) bool {
  
  	ctx := m.TryLockCtx
  	if ctx == nil {
  		ctx = m.ctx
  	}
  
  	// Create a timeout context only if the timeout is greater than zero.
  	if timeout > 0 {
  		var cancel context.CancelFunc
  		ctx, cancel = context.WithTimeout(ctx, timeout)
  		defer cancel()
  	}
  
  	if err := m.mtx.Lock(ctx); err != nil {
  		log.Debugf("TryMutex: TryLock err: %v", err)
  		if err != context.Canceled && err != context.DeadlineExceeded {
  			log.Panicf("TryMutex: TryLock panic: %v", err)
  		}
  		return false
  	}
  	return true
  }
docs: // TryLock attempts to lock m. If no lock can be obtained in the specified
  // duration then a false value is returned.