Skip to content

Commit 37dd0a4

Browse files
authored
Merge pull request #1511 from jeysal/master
Multithreaded web server: explain unexpected browser behavior
2 parents 3f58404 + 1ec2585 commit 37dd0a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

2018-edition/src/ch20-02-multithreaded.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,6 +1126,11 @@ overloaded if the server receives a lot of requests. If we make a request to
11261126
*/sleep*, the server will be able to serve other requests by having another
11271127
thread run them.
11281128

1129+
Note that if you open */sleep* in multiple browser windows simultaneously, they
1130+
might load 5 seconds apart from each other, because some web browsers execute
1131+
multiple instances of the same request sequentially for caching reasons. This
1132+
limitation is not caused by our web server.
1133+
11291134
After learning about the `while let` loop in Chapter 18, you might be wondering
11301135
why we didn’t write the worker thread code as shown in Listing 20-22.
11311136

0 commit comments

Comments
 (0)