explain synchronous and asynchronous in C#

Answer Posted / swaroopkumar1069

In simplest words, synchronous functions block the calling function until they complete their task. For instance, Thread.Sleep, Console.WriteLine and Console.ReadLine, these function do not let the control to shift to the next lines until they perform their functionality. Asynchronous methods are those methods which return immediately to the caller function and continue executing their task in parallel with the caller function. They do not block the caller function and it is due to this reason that they are called non-blocking functions

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we override static class in c#?

559


What is multidimensional array in c#?

554


What is the .net datatype that allows the retrieval of data by a unique key?

538


Is array a collection c#?

611


What is difference between interface and abstraction?

544






Define acid rule of thumb for transactions in c#.

572


What are the methods in c#?

617


Could you explain the difference between func vs action vs predicate?

536


Define boxing and unboxing in c#?

572


Why do we use parameters in c#?

588


Are there functions in c#?

593


how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.

1367


What are async and await?

632


How many digits are in an integer?

542


What is the use of console readline () in c#?

547