/    Sign up×
Community /Pin to ProfileBookmark

Asynchronous call

In my app, there is a function call which puts all rows from buffer to rows collection. This function/process somehow ties up the CPU (I guess), so that other process/function has to wait till it is completed.

Now, I try to make the function call an [B]Asynchronous [/B]call, so that while this process is working, the other process can also work at the same time.

How could I code this Asynchronous call?

Reference codes:

function test1(){

//This function display a flash object
displayFlashObjForInFo();

[B]//This is the function that need to be Asynchronized
toBeAsynchronized(a, b, c);[/B]

//remove the display
removeFlashObjForInFo();

Thanks

Scott

}

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@magentaplacentaMar 05.2008 — Sounds like you need to check your open() method. By default, the open() method sets up an asynchronous request, but if you pass false as the 3rd argument, it sets up the server's request synchronously.

Note: "request" would be my XHR object.

request.open("GET", url) [b]asynchronous[/b]

request.open("GET", url, true) [b]asynchronous[/b]

request.open("GET", url, false) [b]synchronous[/b]
×

Success!

Help @scottjsn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...