semaphore, pgraph: Add semaphore grouping and tests
If two resources are grouped, then the result should contain the semaphores of both resources. This is because the user is expecting (independently) resource A and resource B to have a limiting choke point. If when combined those choke points aren't preserved, then we have broken an important promise to the user.
This commit is contained in:
@@ -57,7 +57,7 @@ func Uint64KeyFromStrInMap(needle string, haystack map[uint64]string) (uint64, b
|
||||
}
|
||||
|
||||
// StrRemoveDuplicatesInList removes any duplicate values in the list.
|
||||
// This is a possibly sub-optimal, O(n^2)? implementation.
|
||||
// This implementation is possibly sub-optimal (O(n^2)?) but preserves ordering.
|
||||
func StrRemoveDuplicatesInList(list []string) []string {
|
||||
unique := []string{}
|
||||
for _, x := range list {
|
||||
|
||||
Reference in New Issue
Block a user