task增加任务完成后通知
This commit is contained in:
@@ -23,6 +23,12 @@ type Task interface {
|
||||
|
||||
// GetPriority 获取任务优先级
|
||||
GetPriority() int
|
||||
|
||||
// Done 返回一个channel,当任务执行完毕时该channel会被关闭
|
||||
Done() <-chan struct{}
|
||||
|
||||
// IsDone 检查任务是否已完成
|
||||
IsDone() bool
|
||||
}
|
||||
|
||||
// taskItem 任务队列中的元素
|
||||
|
||||
Reference in New Issue
Block a user