Questions tagged [asynccallback]

A callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time. An asynchronous or deferred callback is invoked after a function returns, or at least on another thread’s stack.

A callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time. An asynchronous or deferred callback is invoked after a function returns, or at least on another thread’s stack.

More Info

457 questions
0
votes
1 answer

Making stored function based confirmation / callback system work with multiple processes in django + nginx

Our callback system worked such that during a request where you needed more user input you would run the following: def view(req): # do checks, maybe get a variable. bar = req.bar() def doit(): foo = req.user …
Tonis F. Piip
  • 776
  • 2
  • 6
  • 16
0
votes
1 answer

GWT displaying widgets with asynchronous calls on RootPanel

I am having problems while adding my widget into the RootPanel of another container class. I think that it may be related to the Asynchronous call that I make during the creation of the widget. I have a main class named ImageView which implements…
yunusual
  • 325
  • 3
  • 9
0
votes
2 answers

using callback in a function in node.js

I had a code like this : router.post('/call' , async (req , res)=>{ try{ await async.mapLimit(req.body.n , 5 , (id , callback)=> { ////do something callback("message") }, (err , rest)=>{ …
behnam
  • 100
  • 1
  • 8
0
votes
1 answer

callback given to call_soon or call_soon_threadsafe is never called

I want to call a function on the main thread loop every N seconds. To do this, a Threading.Timer is initialized with a _timer_handler() function. This function is called in the Timer thread context, I try to call _refresh_token() on the main thread…
0
votes
2 answers

Handling repeater events aynchronously

I have a custom search control on my page (asp.net) which contains a textbox and a repeater for displaying results. The repeater is populated with a callback as the user types ... nice and simple callback. ... When a search result is selected the…
War
  • 8,539
  • 4
  • 46
  • 98
0
votes
1 answer

Force async print order with callbacks

I am creating a learning module for my students where I am trying to demonstrate the power of promises vs callbacks. Unfortunately I am coming from a Python background so callback hell is not something I have had to deal with. The task at hand is I…
Eric Ianni
  • 75
  • 1
  • 7
0
votes
1 answer

How to migrate to callback nodejs

I need to transform this code into clean code that uses callbacks, because this code does not allow me to use body information elsewhere. const endpoints = []; function getDevicesFromPartnerCloud() { var options = { method: 'GET', …
Anas
  • 73
  • 1
  • 3
0
votes
1 answer

Async Processing for Node.js POST Request Response

I'm relatively new to Node.js and I'm creating a server that will accept a POST request from a mobile app whose body contains a credential that will then be verified via a GET to another server. If the GET response validates the credential, then the…
G. Steve
  • 2,739
  • 2
  • 11
  • 17
0
votes
0 answers

Javascript: Object property has and doesn't have value at the same time?

JS newbie here so perhaps I don't even realize how to word this question properly, my apologies. A 3rd party function by default uses callback to make an HTTP request and return a value. Below is simplified sample from the…
Putnik
  • 5,925
  • 7
  • 38
  • 58
0
votes
2 answers

Get values with callback method for other class in android retrofit

I'm trying to get the data I parse from onResponse method via Callback. Here is my ApiClient: public class ApiClient implements Callback> { private ChannelCallback listener; static final String BASE_URL =…
cs.kkeser
  • 5
  • 4
0
votes
0 answers

Order of execution in chrome extension that's using executeScript and SendMessage

I want to do the following in this order 1. User clicks button (id='copyDetails') in the popup window 2. Text from specific elements (inc. name field) that are on the users page are stored in a hash and sent to background.js 3. The hash from step 2…
0
votes
1 answer

Is this an acceptable method of avoiding callback hell in old versions of node?

No promises, no async etc I wondered if this pattern is acceptable - my function is called and i'm passed a callback. I need to do 2 things before I can call that back: function doSomething(..args.., callbackThatNeeds1And2DoneFirst){ var done1…
Caius Jard
  • 72,509
  • 5
  • 49
  • 80
0
votes
1 answer

How can I get a callback to execute properly when there is a "for loop" in a function?

It seems that since i have a "for loop" and multiple if/else scenarios, the callback never gets fired. When I remove the "for loop" it works fine. What am I doing wrong here? How do I force the callback to wait until all the for loops and…
sakeferret
  • 305
  • 1
  • 6
  • 15
0
votes
1 answer

Node.js call back function on termination of a user defined function

I have a node.js app consisting of a timer calling a user defined function made up of a bunch of functions in node language. The calling script has a timer calling function mybuy() every 10 seconds; mybuy() buys crypto currencies using Binance api…
alberto
  • 115
  • 4
  • 19
0
votes
0 answers

Wired promise nested .then handler order

I am learning promise recently and when I am play about .then I found I could not explain what i found in this code for myself... I know we should avoid from using nested then, because one of the advantages of .then is no callback hell any more. But…
ss m
  • 1