cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Async setting on Data Tables...what's it's function?

chrish
12-Amethyst

Async setting on Data Tables...what's it's function?

The Text InfoTip associated with "ASYNC" states, "Executes the service asynchronously. Without additional coding (i.e. event subscriptions, property changes, ect.) or logging, values and/or exceptions are not returned."

Can someone explain this a bit better? What's it's impact? What are the Pros/Cons?  I'm trying to determine when I need to enable this.

In general, is there s Developers Guide that I can reference for questions like this?

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:chrish)

ASynch means the process will run on its own thread and finish whenever it finishes, while it just continues with the remaining code. It means that there isn't a wait for a returned result.

That means you can't output information from that service.

It also means you can't tell if it finishes or not.

So you would need other means to check on the results of running that service.

Synch means the thread runs and returns status and/or information that it is done, before progressing to the next step in the code.

Biggest gain with Asynch is that your calls don't hold up the progression of the code, biggest negative, you have no way of knowing if it ran successfully without some other code and process to check for it.

View solution in original post

3 REPLIES 3
PaiChung
22-Sapphire I
(To:chrish)

ASynch means the process will run on its own thread and finish whenever it finishes, while it just continues with the remaining code. It means that there isn't a wait for a returned result.

That means you can't output information from that service.

It also means you can't tell if it finishes or not.

So you would need other means to check on the results of running that service.

Synch means the thread runs and returns status and/or information that it is done, before progressing to the next step in the code.

Biggest gain with Asynch is that your calls don't hold up the progression of the code, biggest negative, you have no way of knowing if it ran successfully without some other code and process to check for it.

Communication on Async services should be done with Events/Subscriptions, when your Aysnc service ends just throw an Event with the result ( ok/ko )

But by the way, if you are asking what's Async/Sync, better don't use Async, it will generate more headaches than gains for you, and TW it's a beat picky with Async and you will end up with lot of blocking situations and instability.

Best Regards,

Carles.

chrish
12-Amethyst
(To:CarlesColl)

I understand what Async/Sync means in general, I was asking more of the exact behavior in ThingWorx.  Thank you Carlos and Pai!  After posting this question, I also found Discussion Topic: Re: Asynchronous?​ Which also answered my question.

Announcements


Top Tags