Last updated: Dec 08, 22 20:13 UTC | Permalink
5 - Concurrency Patterns in Typescript
Learning Objectives:
1 GHz CPU executes an instruction every 1 ns. Almost anything else takes approximately forever. Rather than waste time waiting for a long-running operation to complete, we want our programs to make progress on other tasks. This is called “masking latency with concurrency”.
In this lecture, we will study some common patterns for organizing concurrency in Typescript/Javascript.
By the end of this lesson, you should be prepared to:
- Explain how to achieve concurrency through asynchronous operations and Promise.all in TypeScript.
- Write asynchronous and concurrent code in TypeScript using async/await and Promise.all.
Important Dates:
- Individual Project Deliverable 1 Due Sep 21 by 11am
Lecture Slides:
- Concurrency Patterns in Typescript Slides PDF, PPT
Activities:
- Async Activity (zip file)
Resources
- Code Examples from Slides (zip file)