go DelegateWork(mr, <-mr.impl.readyWorkers, jobArgs)
In the above example, would the channel receive operator cause the caller or the called goroutine to block?
go DelegateWork(mr, <-mr.impl.readyWorkers, jobArgs)
In the above example, would the channel receive operator cause the caller or the called goroutine to block?
The function value and parameters are evaluated as usual in the calling goroutine, but unlike with a regular call, program execution does not wait for the invoked function to complete. Instead, the function begins executing independently in a new goroutine.
So if <-mr.impl.readyWorkers
blocks, it blocks the caller goroutine, before the new goroutine is launched.