simplify task package implementation

This commit is contained in:
yusing
2025-01-01 06:07:32 +08:00
parent e7aaa95ec5
commit 1ab34ed46f
35 changed files with 547 additions and 600 deletions

View File

@@ -61,3 +61,7 @@ func (set Set[T]) RangeAllParallel(f func(T)) {
func (set Set[T]) Size() int {
return set.m.Size()
}
func (set Set[T]) IsEmpty() bool {
return set.m == nil || set.m.Size() == 0
}