VM
Size: a a a
VM
АП
АП
АП
АП
АП
АП
АП
Z
// remoteDeleteEmployeeRPC will delete an employee over the network.
func remoteDeleteEmployeeRPC() {
...
}
// sem is a channel that will allow up to 10 concurrent operations.
var sem = make(chan int, 10)
func main() {
for _, employee := range employeeList {
sem <- 1
go func(){
remoteDeleteEmployeeRPC(employee.ID)
<-sem
}()
}
}
X
DP
АП