Synchronous calls and asynchronous calls
What is a synchronous call. What is an asynchronous call. The synchronous call is when the client waits for the call to finish and returns the result. The asynchronous call is that the client does not wait for the call to complete the return result, but can still receive a notification of the return result through the callback function. If the client does not care about the result, it can become a one-way call. This process is a bit like the callable and Runnable interfaces in Java, when we execute asynchronously, if we need to know the result of execution, we can use the callable interface, and we can get the result information of asynchronous execution through the future class. If you do not care about the results of execution, the direct use of the Runnable interface can be, because it does not return the results, of course, callable is also possible, we do not go to get the future on it.