You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behavior seems to be intentional, so I'm curious if there's an implementation reason why this isn't allowed?
Here's an example:
vartasks []func() Rulefor_, rule:=rangematchingRules {
ifrule.Disabled {
continue
}
tasks=append(tasks, func() Rule {
returnlookupRule(ctx, rule, body)
})
}
// panic if len(tasks) == 0, rather than returning `nil, nil`returnruleLookupPool.NewGroup().Submit(tasks...).Wait()
It's easy enough to do a length check first but it was a bit unexpected -- I expected to get an empty slice back.
That said, I'm guessing the expected pattern is to call Submit multiple times instead and will update my code as such -- but thought I'd raise the issue in case there's any additional context around it.
The text was updated successfully, but these errors were encountered:
This behavior seems to be intentional, so I'm curious if there's an implementation reason why this isn't allowed?
Here's an example:
It's easy enough to do a length check first but it was a bit unexpected -- I expected to get an empty slice back.
That said, I'm guessing the expected pattern is to call
Submit
multiple times instead and will update my code as such -- but thought I'd raise the issue in case there's any additional context around it.The text was updated successfully, but these errors were encountered: