Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
A blocking operation requires the program to halt while it is waiting for a slow resource.
Typically, this is either a hardware resource (such as a disk drive), or a network resource (such as an HTTP request). Because the request cannot require a result from a slow resource, it blocks subsequent operation until it is complete, even if the computer or program still has available resources such as CPU or memory available.
A callback is a function that is “called back” to after a blocking operation. Typically, this is an I/O operation such as disk access. Callbacks can take parameters.
See Pseudoclass
A unit of code that can be invoked with a set of variable
parameters. It may pass a single return. In JavaScript, functions also
have a context, which defines the value of the
reserved this variable. Functions in
JavaScript are considered first class in that they
can also be treated as variables or properties of objects.