December 2013
Intermediate to advanced
480 pages
14h 11m
English
Some code executes immediately, some code requires time to complete or might never complete at all. For example, retrieving the value of a local variable is an immediate operation. Retrieving data from a remote website with an Ajax request takes longer or might not complete at all.
When an operation might take a long time to complete, you should write your code so that it executes asynchronously. Instead of waiting for an operation to complete, you should start the operation and then do something else until you receive a signal that the operation is complete.
An analogy: Some telephone customer service lines require you to wait on hold—listening to really bad music—until a customer service representative ...
Read now
Unlock full access