On 29. jan. 2019, at 2:00 f.h., 伊藤和也 <[email protected]> wrote: > In general computing, a deadlock is a situation where two different programs > or processes depend on one another for completion, either because both are > using the same resources or because of erroneous cues or other > problems.https://www.techopedia.com/definition/2766/deadlock-computers
This is the meaning here, although in Go you have to read it as "two different goroutines depend...". (It's a general concept and could apply to "programs", "threads of control", "goroutines", "processes", "tasks", etc.) The example you posted only has one goroutine, but usually, "deadlock" refers to situations with at least two mutually-blocking processes. For example, maybe there is one routine that can't proceed until another routine consumes a value from the channel, but that other routine also can't proceed until the first does something. The "dining philosophers problem" is sometimes used as an example: https://en.wikipedia.org/wiki/Dining_philosophers_problem -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
