Most voted "asynchronous" questions
Asynchronism refers to requests that are made independently, without synchronism, in which several requests can be sent in pararelo, where each reply returns when it is completed. Through this method it is possible to send as well as receive information in various formats such as JSON/XML/HTML and it is possible to do all this without the need to update the page.
Learn more…127 questions
Sort by count of
-
70
votes3
answers204336
viewsWhat is the difference between asynchronous and synchronous communication?
I’ve heard a lot about asynchronous and synchronous communication, but I don’t know what they really are. Could someone explain to me what the difference and how each one works? When and what should…
-
32
votes1
answer7672
viewsHow does asynchronous programming work in Javascript?
As far as I know, asynchronous programming in C#, for example, uses the idea of threads. The tasks to be performed can be divided into threads and then run in parallel. I always imagined that…
-
29
votes7
answers9251
viewsIn C#, what is the await keyword for?
I was studying this documentation about Asp.net Identity, and in the examples in C# has a keyword that I don’t know, which is the await, example : [HttpPost] [AllowAnonymous]…
-
29
votes1
answer1130
viewsWhen using async and Defer, is the order of the scripts respected?
For a single script, the load/run order in presence or not of attributes async and defer is clear: with nothing, loads and executes immediately, with async loads in parallel and performs at the end…
-
22
votes1
answer3430
viewsIn the new browsers now there will be no more synchronous requests?
I saw it today in mine Google Chrome, updated to the version 40.0.2214.91, a message that said Synchronous Xmlhttprequest on the main thread is deprecated because of its detrimental effects to the…
-
20
votes3
answers20650
viewsWhen to use Success: Function() and . done(Function()) in asynchronous requests?
Simply put, I can write an asynchronous request like: $.ajax({ url: url, dataType: 'json', type: 'GET', success: function (_user){ alert (_user) } }); that alerts me to the return _user. Likewise, I…
-
20
votes3
answers8582
viewsWhat are Parallel.For and Parallel.Foreach loops?
I saw the use of Parallel.For and Parallel.ForEach in some places, I know they are loops, but I didn’t understand how and when to use them and I have my doubts. What are loop Parallel.For and…
-
16
votes3
answers3624
viewsWhen to use asynchronous or synchronous method?
When to use asynchronous or synchronous methods in controllers (index, search, delete, create) of ASP.NET MVC applications? Can I lose performance? In which situations should I use one or the other,…
c# asp.net-mvc .net entity-framework asynchronousasked 7 years, 8 months ago George Wurthmann 4,415 -
15
votes2
answers8548
viewsWhat is the asymchronism?
In a question about use or not use Node Js, I ended up having to give an explanation about what is the asynchronymism. And it seems that the community would benefit in a general way from a formal…
asynchronousasked 8 years, 8 months ago Bruno Costa 5,878 -
15
votes2
answers5495
viewsWhat are Async methods?
I noticed that most methods in C# have an equal method but with a name async. What are these methods and how they work?
-
15
votes3
answers2510
viewsWhen not to return Task in async methods?
Normally, in some time-consuming tasks, I use asynchronous methods: public async Task myLongRunningOperation(int i) { ... } However, in what situations I don’t necessarily need to return a Task?…
-
13
votes1
answer545
viewsHow does ES7 async/await work?
ES7 allows you to use a new syntax to work with Promises known as async/await functions. How I can use these functions and how they are compared to functions that use Promises to process sequential…
javascript asynchronous ecmascript-6 promises async-awaitasked 8 years, 4 months ago Gabriel Gartz 5,624 -
13
votes2
answers2425
viewsWhat is a state machine?
I’m doing a tour on the site, researching on asynchrony, threads, parallelism and the like. Upon finding this reply, I noticed that the author makes a quote about state machines. I didn’t understand…
-
11
votes3
answers2839
viewsWhat is the solution for asynchronous PHP processes?
In PHP many times, in the middle of an operation, I need to send an email, make a call webservice or register a log, and these can sometimes take a while to process, but without having to wait for…
-
9
votes1
answer515
viewsWhat are the pros and cons of the Task<List<Object>> implementation on List<Object>
What are the advantages between the two implementations below. Both return a list with multiple products (more than 1k): public Task<List<Product>> GetAllProductsAsync() { var query =…
-
9
votes3
answers432
viewsJavascript - Thread, Asymchronism, Ticks
Situation Studying on Thread, I understood that they are lines of execution within a process. Studying on Assincronismo em javascript, I understood that it does not support multiple Thread, but has…
-
7
votes1
answer86
viewsHow does async/await work in Rust?
The idea of async/await has become common in several languages (C#, Javascript etc). It seems that Rust recently (in the 2018 edition of Rust) adopted the idea of async/await, together with the…
-
7
votes1
answer118
viewsHow to adapt a function that only accepts callback to the promise interface in Javascript?
I’m using an external library function to acquire the token of a user, it is the following: export default function GetGraphToken( email: string, password: string, callback: (graphClient: Client,…
-
6
votes3
answers325
viewsPrevent the system from locking during a batch e-mail
I am developing a system that sends mail in batches to customers, but if the user who is operating the system click on any part of the window during the process, it appears that the system is not…
-
6
votes1
answer561
viewsProblems Xamarin Asynchronous method
In the event of a button of my APP had the following code it worked running on the android emulator, but when I passed the app to the mobile generates a message the app stopped. Button…
-
6
votes1
answer201
viewsDoes the keyword "async" really make the asynchronous method?
I was seeing a video (at 31:11 minutes) and there says that async does not make the method really asynchronous, it is more a "hint". As it was in English and I am not totally advanced, it was half…
-
6
votes3
answers230
viewsBi-directional asynchronous communication in layers
I have system in Asp.Net MVC (.Net 4.5) divided in layers: That said, let’s get to the problem... I’m trying to create a screen to send emails asynchronously (3 emails at the same time, for…
-
6
votes1
answer735
viewsHow to turn an asynchronous function into synchronous?
I have an asynchronous function and I would like it to become synchronous, because being asynchronous she is sending the data to the client before even completing the necessary steps, follows code:…
-
6
votes1
answer793
viewsWhat is the use of Task.Yield?
The documentation of this method says: Method Task.Yield() - adapted from English Creates a task suitable which returns asynchronously to the current context when awaited. I read the his source code…
-
5
votes1
answer503
viewsHow to write an asynchronous method?
I have the following method: public void Contar() { int numero = 1; for (int i = 0; i < 100000; i++) { numero *= i } return numero } Supposing that the method Contar() take time to lock the UI of…
-
5
votes1
answer1242
viewsAre there differences between the terms Thread, Multithread, Async and Await?
I asked that question here at Stack Ooverflow: What is the solution for asynchronous PHP processes? I did it because I wanted that in the middle of a process execution, I wanted to have a certain…
terminology thread multithreading async asynchronousasked 7 years, 7 months ago Wallace Maxters 102,340 -
5
votes2
answers2000
viewsWhat is the difference between async Task and void?
I use async Task with await when I need my code to wait for such a task to complete until it performs another process. In the case of methods void, without async-await, my code also does not "wait"…
-
5
votes1
answer225
viewsAsynchronous programming C#
How would my application behave in a scenario where I perform an asynchronous query in the database and then manipulate the returned value? The application would wait for the query to be finalised…
-
4
votes1
answer66
viewsWhy can’t we use Await inside a Catch, Finally and Synclock in VB?
Why can’t we use the operator Await within the statements Catch, Finally and Synclock in VB? The C# 6.0 has support to use the Await within the Catch/Finally.…
.net vb.net characteristic-language try-catch asynchronousasked 7 years, 12 months ago vinibrsl 19,711 -
4
votes1
answer163
viewsWebworker and Async - What is the difference and when to use it?
I am studying specifically an implementation of Webworker, and did not understand very well the difference between Webworker and Async in Javascript, whereas Webworker gives me an asynchronous…
-
4
votes0
answers37
viewsWhat are the differences between Asymchronism, Parallelism and Multithread?
Sometimes the terms Asynchronous, Multithread and Parallelism appears whenever I do a search related to multiprocessing or something related. However, I have a hard time understanding the…
-
4
votes1
answer533
viewsWhat is the difference between Task and async Task?
In the code below I wrote two methods, one with the return Task and another async Task. What happens differently in the execution of these methods since for one added in the construction the…
-
4
votes1
answer46
viewsIs there a difference between corroding, fiber and green threads?
According to the title of the question, I see these names being used to describe very similar things. In the Python world we have Greenlets described as corroding and Green Threads. In the Java…
-
3
votes1
answer62
viewsScope in asynchronous call (Javascript)
Suppose I had the following method: this.loadCustomers = function(){ Request.get("php/loadCustomersAction.php", (function(error, data){ if(!error) this.setCustomers(data); }).bind(this)); }; where…
-
3
votes1
answer99
viewsHow to create an asynchronous method that is cancellable?
How to create an asynchronous method that is cancellable? In this context, the DoFoo() does things that cannot simply be stopped, like reading and writing files, and when canceling, I have to wait…
-
3
votes1
answer115
viewsHow do I know the client sent me something?
I made this code here following some tutorials over the internet. buttonAbrirConexão.Enabled = false; TcpListener servidor = new TcpListener(6554); servidor.Start(); while(true) {…
-
3
votes2
answers1432
viewsQuery return in Javascript variable
I am making a code in Node.js that accesses SQL Server database. I created a variable that stores the result of a query, the problem is that I can’t access this variable outside of the connection…
-
3
votes1
answer710
viewsTransforming synchronous into asynchronous method
I have the following method: public string MyMethod1(string myParam1) { // Implementação return myReturnValue; } I needed to create an asynchronous method that did the same thing, to process several…
-
3
votes2
answers425
viewsAsynchronous alternative to Thread.Sleep without locking application in C#
Sometimes we want our application to wait a few moments to proceed with the next instruction, however the Thread.Sleep(0) can cause crashes in your application, mainly using in loops. So here’s a…
-
3
votes1
answer82
viewsWhat are the differences in backend and frontend?
When we use async and await in the backend and frontend ? Is it better? It’s worse? Other related questions: An API, for example in C#, if all methods are async and await, I can say it’s better than…
asynchronous language-independent async-awaitasked 5 years, 2 months ago Samuel Renan Gonçalves Vaz 720 -
3
votes3
answers6975
viewsJavascript function 1 wait function return 2 (Sync await Promise.all)
I am very doubtful about the use of async/await and also of Promise.all. I have the following code: class Conexao { constructor(loading) { this.loading = loading; } acessar(rota) { return…
-
3
votes1
answer384
viewsAsparallel(). Forall vs async await
When to use AsParallel().ForAll, and when to use async await? I am providing an example with a download and file manipulation routine. The AsParallel().ForAll has better performance in the download…
-
3
votes1
answer581
viewsHow to turn several asynchronous requests into synchronous?
How could I perform the function sortOrder as soon as the function getOrders complete all requests? The idea is to sort all orders by latest purchase date. Code mounted () { this.user =…
-
2
votes2
answers816
viewsMake one asynchronous function wait for another
I am developing a Javascript system with Node.JS and Redis, however, due to the asynchronous functions the loop ends before the functions, which causes the response array to be misordered or the…
-
2
votes2
answers379
viewsArray returning Undefined because of asynchrony
I’m accessing the API of Trello, but I came across the following problem: Access Trello information by obtaining the id of each existing queue, the code is as follows: var x; var numberCardsByList =…
-
2
votes1
answer47
viewsWindows service, using async method, is there a need?
In my system, I have some auxiliary routines, which are fired at defined times, outside of work hours. These routines are run by a Windows service program. Would you need to run these asynchronous…
-
2
votes1
answer157
viewsWhy is it not possible to capture exceptions triggered by async void?
Why it is not possible to capture exceptions triggered by non-recurring asynchronous methods Task? public async void calcularPrecos() { var tabelaPreco = await getTabelaPreco(); /* Blá, blá, blá...…
-
2
votes1
answer72
viewsRun fast things synchronously and time-consuming things asynchronously?
Usually, on . NET, I run things time-consuming asynchronously so as not to stop the thread visual. In a simple example, if I have a loading in the UI, should lengthy things be executed without…
-
2
votes1
answer75
viewsUnexpected behavior in asynchronous javascript
I am writing backend code using javascript, Node and npm 'mysql' and 'request' modules. I tried to write a module to make a pooling of SQL database connections by different API calls in various…
-
2
votes1
answer278
viewsHow to avoid blocking requests?
I’m doing a project in ASP.NET MVC + IIS and realized that when making a request to a page with long reading in the Database (using Entity Framework), if I open another window and try to access any…