Track 6
Concurrency
Doing several things at once: threads, async and await, and the timing bugs that shared data invites.
2 pages, each with a live figure. Read them in order: later pages build on earlier ones.
- 6.2Async and awaitStep throughA way to write code that waits (for the network, a disk, a timer) without blocking:
awaitpauses the function and lets other work run until the result is ready. - 6.3Race conditionsReplayA bug where the result depends on the timing of threads or tasks that share data, so the same code is right on one run and wrong on the next.
Coming soon
- Threads