Grokking Concurrency in Go
Vote

0% completed

​

Case Study: A Parallel File Indexer

Output:

24 words indexed in 400ms channel: [docs/channels.txt docs/select.txt notes/questions.txt] mutex: [docs/sync/mutex.txt notes/todo.txt]

This program builds a word index of eight small text files. A word index, also called an inverted index, maps each word to the files that contain it. Search features in editors and websites are built on this structure. The files are stored in a testing/fstest.MapFS, an in-memory file system from the standard library. Each read sleeps for 50 ms to imitate a slow disk or a network file system.

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content