Grokking Concurrency in Go
Vote

0% completed

​

Fan Out and Fan In

A post office has one line of customers and three counters. The customer at the front of the line goes to whichever counter becomes free next. No counter is given particular customers, and a counter that finishes quickly simply serves more of them. Three counters serve the line about three times as fast as one.

The customers do not leave in the order they joined the line, however. A customer with a short errand at counter two can leave before a customer who arrived earlier and has a long errand at counter one. Anyone who needs the original order has to restore it afterward.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content