feat: add task completion

This commit is contained in:
sujit
2024-10-23 14:29:23 +05:45
parent 6caac4030f
commit 56d72d0706
2 changed files with 57 additions and 34 deletions

View File

@@ -19,6 +19,12 @@ func WithTaskTimeout(t time.Duration) PoolOption {
}
}
func WithCompletionCallback(callback func()) PoolOption {
return func(p *Pool) {
p.completionCallback = callback
}
}
func WithMaxMemoryLoad(maxMemoryLoad int64) PoolOption {
return func(p *Pool) {
p.maxMemoryLoad = maxMemoryLoad