diff --git a/README.md b/README.md index 0ea8809..0590108 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ execution, "what was the path of asynchronous functions that got me here"? ## Terminology One of the key challenges with "asynchronous context" is the lack of agreed upon terminology and semantics. Let's define some: -1. `Execution Frame` - An `Execution Frame` is a period of program execution, defined precisely as the period of time that a special function, called a `Continuation`, is executing. At a lower level of abstraction, you can think of an `Execution Frame` as the period of time from when specific call frame is pushed on the stack, until that call frame is unwound off of the stack. Not all functions are `Continuations` (more on that below). +1. `Execution Frame` - An `Execution Frame` is a period of program execution, defined precisely as the period of time that a special function, called a `Continuation`, is executing. At a lower level of abstraction, you can think of an `Execution Frame` as the period of time from when specific call frame is pushed on the stack, until that call frame is unwound off of the stack. Not all functions are `Continuations` (more on that below). A specific instance of a `Continuation` can be invoked multiple times; each invocation corresponds to a unique `Execution Frame`. 2. `Continuation` - A `Continuation` is a JavaScript function created in one `Execution Frame` and passed to a host library to be invoked later. Upon invocation, a `Continuation` creates a new unique `Execution Frame`. For example, when we call `setTimeout(function c() {}, 1000)`, `setTimeout` is invoked in one `Execution Frame`, with the caller passing a `Continution` (namely `c`) as a parameter. When `c` is invoked after the timeout period, a new `Execution Frame` is created, and when `c` completes, that `Execution Frame` is completed.