Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change incorrect references of parallelism to correct reference of co… #739

Merged
merged 1 commit into from
Mar 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ FAIL github.com/gypsydave5/learn-go-with-tests/concurrency/v1 0.010s

```

### A quick aside into a parallel(ism) universe...
### A quick aside into the concurrency universe...

You might not get this result. You might get a panic message that
we're going to talk about in a bit. Don't worry if you got that, just keep
Expand Down Expand Up @@ -463,12 +463,12 @@ We then use the `result` received to update the map.

By sending the results into a channel, we can control the timing of each write
into the results map, ensuring that it happens one at a time. Although each of
the calls of `wc`, and each send to the result channel, is happening in parallel
the calls of `wc`, and each send to the result channel, is happening concurrently
inside its own process, each of the results is being dealt with one at a time as
we take values out of the result channel with the receive expression.

We have parallelized the part of the code that we wanted to make faster, while
making sure that the part that cannot happen in parallel still happens linearly.
We have used concurrency for the part of the code that we wanted to make faster, while
making sure that the part that cannot happen simultaneously still happens linearly.
And we have communicated across the multiple processes involved by using
channels.

Expand All @@ -494,8 +494,8 @@ demonstrating that it had actually become faster.

In making it faster we learned about

- *goroutines*, the basic unit of concurrency in Go, which let us check more
than one website at the same time.
- *goroutines*, the basic unit of concurrency in Go, which let us manage more
than one website check request.
- *anonymous functions*, which we used to start each of the concurrent processes
that check websites.
- *channels*, to help organize and control the communication between the
Expand Down
Loading