December 2019
Intermediate to advanced
346 pages
9h 8m
English
The asynchronous model allows us to execute multiple tasks concurrently. If we call a method asynchronously, the method is executed in the background while the thread that is called returns immediately and executes the next line of code. The asynchronous method may or may not create a thread, depending on the type of task we're dealing with. When the asynchronous method finishes, it returns the result to the program via callbacks. An asynchronous method can be void, in which case we don't need to specify callbacks.
The following is a diagram showing a caller thread executing the M1() method, which calls an async method called M2():
Contrary to the previous approach, here, caller thread doesn't ...
Read now
Unlock full access