Compare commits

...

1 Commits

Author SHA1 Message Date
412277b3e0 v0.0.63 2023-01-28 22:29:45 +01:00

View File

@@ -105,3 +105,12 @@ func (s *Stack[T]) Length() int {
return len(s.data)
}
func (s *Stack[T]) Empty() bool {
if s.lock != nil {
s.lock.Lock()
defer s.lock.Unlock()
}
return len(s.data) == 0
}