Synchronous calls and asynchronous calls

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.