Skip to content

Commit 597f248

Browse files
Focus on synchronous programs blocking (tokio-rs#67)
This change introduces synchronous programming as a blocking style, more in line with the contrast drawn in the following paragraph. The prior phrasing focused on linear program order execution, presumably to draw a contrast with the state machine model that a lot of asynchronous programs follow. While interesting, the context really is a discussion of blocking/non-blocking.
1 parent d71b1c5 commit 597f248

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/tokio/tutorial/hello-tokio.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ synchronous. The only indication that the operation is asynchronous is the
9191

9292
## What is asynchronous programming?
9393

94-
With synchronous programming, a program executes in the same order that it is
95-
written. The first line executes, the the next, and so on. When the program
96-
encounters an operation that cannot be completed immediately, it blocks until
97-
the operation completes. For example, establishing a TCP connection requires an
98-
exchange with a peer over the network takes some amount of time. During this
99-
time, the thread is blocked.
94+
Most computer programs execute in the same order that it is written. The first
95+
line executes, then the next, and so on. With synchronous programming, when a
96+
program encounters an operation that cannot be completed immediately, it will
97+
block until the operation completes. For example, establishing a TCP connection
98+
requires an exchange with a peer over the network takes some amount of time.
99+
During this time, the thread is blocked.
100100

101101
With asynchronous programming, operations that cannot complete immediately are
102102
suspended to the background. The thread is not blocked, and can continue running

0 commit comments

Comments
 (0)