Most voted "async" questions
Asynchronous programming is simply to allow certain portions of code to be executed by separate threads.
Learn more…153 questions
Sort by count of
-
2
votes2
answers813
viewsCreating a double array (not a multidimensional array)
I need to pass two values of the kind double for a AsyncTask in my application. I tried to define an array using the following code: double latitude = location.getLatitude(); double longitude =…
-
2
votes1
answer310
viewsJava - Chat async
I want to implement a chat in java, which works asynchronously, and I wanted to know the best architecture to do this. I managed to make a public chat using sockets(Netty), but I got to the…
-
2
votes1
answer177
viewsAuto reconnect reusing an async socket connection
How do I get my socket to reconnect itself when the connection is lost? Preferably reusing the same connection.
-
2
votes2
answers2268
viewsWhat is the difference between Tolistasync() and Tolist()?
What difference between ToListAsync() and ToList()? As in the example below, what is the difference between one and the other? using Modelo.Classes.Contexto; using System.Data.Entity; using…
-
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
answer303
viewsHow to make an ajax request that returns an html text?
Assuming the link making the request is: <%= link_to 'New Classroom', new_classroom_path,class: :remote_link, remote: true %> And may the treatment of the return of the same be:…
-
2
votes2
answers389
viewsAsynchronous server execution problem with Express, Mysql and Socket.IO
I am developing a Node.JS project with Express, Mysql and Socket.IO. When the user opens the main page provided by the server, the request must cause data to be read from the database and sent to…
-
2
votes1
answer97
viewsComo exibr duas mensagens usando Messagedilalog do Windows phone 8.1
How do I print two messages using MessageDialog of Windows Phone 8.1? using System; using System.Collections.Generic; using System.IO; using System.Linq; using…
-
2
votes1
answer1117
viewsProjects with synchronous and asynchronous Apis
I am developing a small project and have, for now, two entities: Product and Customer Product API is asynchronous (with Task and async) and client API is synchronous. I would like to know if there…
-
2
votes1
answer421
viewsPromise return
Considering the example below: function retornaValor (){ return promiseQueveioDeAlgumaLib.then( function(oQueQueroRetornar){ return { sucesso: true, data : oQueQueroRetornar } },…
-
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
answer403
viewsAsync method returning a List<string> how to use?
I have a method called consulta_usuario_email, that is responsible for searching in the table of registered users, the emails of users of a certain department: public async…
-
2
votes2
answers891
viewsAssign the return of a function that returns from a Promise
I am exporting a function to another file that is as a Webpack-simple + Vuejs component. That’s the function of the file api-user.js: export function getUsers () { axios.post('/api/get_list',{})…
-
2
votes1
answer98
viewsSemaphoreslim locking method
I am using Semaphoreslim to make the "lock" of some methods of my Web-API, until it worked correctly but there are times when these same methods get totally stuck, by Postman when I run gets a…
-
2
votes1
answer649
viewsError: NJS-047: poolAlias "default" not found in the Connection pool cache
I’m trying to make a connection using Connection Pool to build a API Nodejs consuming data from Oracledb, I followed the following documentation. However, when trying to make the connection I get…
-
2
votes1
answer49
viewsError using async in Nodejs
I have a system in Nodejs in development and finished a step, for the purpose of testing, I put it on a server and from that began to return me error in all lines of code in which I used the async…
-
2
votes1
answer100
viewsProblem with Http Request Angular
Iae galera! Look, I have a code here that’s gets the user data when he types in his CPF, I recently started using Async functions. the idea of Async would not only be to perform the function from…
-
2
votes0
answers30
viewsRun an asynchronous function in React-Nactivate only the first time it is called
I am using the function of the expo-camera Camera component onBarCodeScanned={(event) => { handleQRCode(event); }} And every time there’s a bar code he calls me handleQRCode, but just passing the…
-
2
votes1
answer72
viewsHow to convert a Promise-based function to callback in Javascript?
We can convert asynchronous functions that work with callback to work with Promises, as shown in the examples below: callback: const timeInMs = 1_000; function asyncCallback(timeMs, callback) {…
-
1
votes1
answer58
viewsC# Stream.Beginsend
As you can see in the link below, the Streamreceiver method uses the Beginread method to read asynchronously, whereas the Senddata method does not use asynchronous writing, which is the logic to…
-
1
votes1
answer114
viewsAsynctask canceled during execution does not call any of the post-InBackground() methods
When I cancel my AsyncTask running, it does not update the flag mAsyncTaskEstaFinalizada. Does anyone know what it might be? When I put breakpoints in the methods onCancelled(),…
-
1
votes1
answer185
views -
1
votes1
answer647
viewsAsynctask finish running
I wonder how I could pause, cancel this function as soon as I close the Activity that is running. private class DownloadImageTask extends AsyncTask<String, Void, Bitmap> { ImageView bmImage;…
-
1
votes2
answers150
viewsWhat is the difference between public async System.Threading.Tasks.Task<Actionresult> Index() and public Actionresult Index()?
Follows the code: Example 1 : public async System.Threading.Tasks.Task<ActionResult> Index() { return View(); } Example 2: public ActionResult Index() { return View(); } Please explain the…
-
1
votes1
answer44
viewsHow to load js style google Analytcs
I am developing a project where I would have to add only one tag on the client site and already load the js with all functions. follows the example of google Analytcs:…
-
1
votes1
answer143
viewsInside the ajax I want to create a variable and use it in several places outside the ajax
I want to create a variable within the ajax and uses it in several other places, it only works when I use the async:false and I know this is no longer recommended, how to do this properly? follow…
-
1
votes2
answers243
viewsParallelism in Sql Server with C#
I am implementing async methods in C# and would like to know how to proceed when I arrive in Sql. When I open a connection to sql server, does it allow me to parallelize through just one connection?…
sql-server async asynchronous parallelismasked 7 years, 3 months ago Fernando Augusto De Almeida Ba 91 -
1
votes1
answer388
viewsAsync Attribute and Defer Javascript - Async Pause Rendering?
I was reading again about async and Defer. I realized that Async, despite loading the script asynchronously, after loading, the HTML is paused to execute the script. Defer would work as an Async,…
-
1
votes3
answers3761
viewsAsync/Await returning Promise{<pending>}
const url = 'http://files.cod3r.com.br/curso-js/funcionarios.json' const axios = require('axios') const busca = () =>{ return new Promise((resolve, reject) =>{ try{ const funcionarios =…
-
1
votes0
answers296
viewsI can’t get access to Xios
I am using Axios by Cdn and error appears: "Uncaught Error: URL contains XSS Injection Attempt" The Javascript code of the main_axios.js file axios.get('https://api.github.com/users/diego3g')…
-
1
votes2
answers530
viewsWinforms C# - Display loading form
I own a main Winforms and would like while the asynchronous task is processing a new form (with GIF) is displayed, this would only close upon completion of processing. frmProcessor _frmProcessor =…
-
1
votes1
answer44
viewsDownload Async + Copy = Copying image 0 bytes
I am simultaneously downloading several photos, and also need to make the copy to a certain folder. What happens is that it makes the copy before finishing the download. public static async Task…
-
1
votes1
answer276
viewsAngularjs 1.6 with asynchronous content loading jQuery Steps plugin
I have a problem that after loading a HTML content dynamically asynchronously with the plugin jQuery Steps: <section data-mode="async" data-url="test.html"></section> the AngularJS does…
-
1
votes0
answers61
viewsStart Async function
Good morning guys, I don’t have much knowledge about async, and maybe someone could help me with this: public async Task<ActionResult> IndexAsync(CancellationToken cancellationToken) { var…
-
1
votes1
answer505
viewsBrowse answer tags from a C#site
I’m performing a query on google by C# and I need to get back from the query the Query Title and the Link of the queries returned. I got my return as follows: public class GoogleSearch { private…
-
1
votes2
answers446
viewsHow to check for async processes running
Does anyone know any way, to check if any process Async is being executed? For example, I would like to do a check, when the user closes the system, and not let close all processes Async be…
-
1
votes2
answers80
viewsMethod is executed by clicking the button despite doing "button01.Enabled = false"
I want to disable a button while the method does not finish. I used button01.Enabled = false;, but even clicking while the button is disabled, the method is called again after it ends. For example,…
-
1
votes1
answer45
viewsAsync request problem with variables
The problem is with variables why the function async is running after the variable assignment. what can I do for the function to run and wait for it to finish to take the variable value? var request…
-
1
votes0
answers21
viewsProgressiring is not shown
I need to show the progressringduring the execution of a task, but it does not appear and the screen is frozen until the execution of the task. private async void btn_Criar_Click(object sender,…
-
1
votes1
answer78
viewsUse await with object that implements the __await__method
From the Python 3.5 was introduced async/await I am implementing some objects long-awaited but I am met with doubts follows an example: #!usr/bin/python3 # -*- coding: utf-8 -*- import asyncio class…
-
1
votes1
answer628
viewsFilter *ngFor async data
As a filter is applied to a *ngFor async, the *ngFor array comes from an Observable. lotes$: Observable<Lote[]>; *ngFor="let lote of (lotes$ | lancamentosFilter:searchText) | async; let i =…
-
1
votes1
answer35
viewsIonic loop reading sensor and sending to api
Hello, I need to take consecutive readings of some sensors in Ionic 3.x but I can’t let it completely block the application. tried to do so: async disparaLeituras(path_id) { while (true) {…
-
1
votes0
answers18
viewsAm I using the Asynchronous Task correctly?
Hello, I am doing a project in ASP.NET MVC and wanted to use an asynchronous task. In my stock I have: public async Task GerarItens(int codigo) { using (var dbTran =…
-
1
votes0
answers56
viewsPick up current location after connecting GPS - android
I am new to Android and am in need of any help. I’m making an app that when opening, I want to be displayed the map with the current location of the user. The problem is that when the GPS is turned…
-
1
votes1
answer36
viewsAsynchronous method
Good morning, I have an ASP.NET MVC 5 application that opens IT calls, I have a procedure that triggers e-mail to users at the end of the task execution (completion, opening, forwarding, etc. of the…
-
1
votes2
answers504
viewsLaravel 5.8 - Can we make Sync in a pivot table without the id field?
I have a table pivot with the countryside user_id and article_id (much for many), let’s say I have the following records: 1-2, 1-3, 1-4, 2-1, 2-2. At a certain point user 1 no longer wants to be…
-
1
votes1
answer153
viewsNon-blocking execution with asynchronous Python functions
I want a certain flow to continue even calling a async.sleep() in the code, I have the following code import asyncio async def funcao_1(name): print("entrando no sono...") await asyncio.sleep(3)…
-
1
votes1
answer61
viewsTesting that all asynchronous functions have been terminated
Greetings I’m developing a synchronizer between two databases (SQL Server and MySQL) with the ElectronJS and the Node.JS and everything is working fine, but I would like it to perform…
-
1
votes1
answer174
viewsReturn of async functions
I’m using the AsyncStorage to save the value of some tokens with the following code: Asyncstorage.js: import AsyncStorage from '@react-native-community/async-storage'; setValue = async (key, value)…
-
1
votes3
answers308
viewsDoubt when exporting Promise
I have an async Function that does a get for an api and returns a random word: word js. require('dotenv').config(); const config = require('./config.js') const axios = require('axios'); const…