Skip to main content
Aug 2, 2020 3:11 PM UTC
Solved

Is it possible to call javascript service sync or async during runtime

Hi, 

 

A JavaScript service can be configured as sync or Async  during design time .    but is it possible to decide it during runtime ? that is , calling javascript service sync or async by passing into a indicator parameter .  

 

Regards,

Sean

Jun 13, 2022 1:53 PM UTC

Nope.

Do note that even if you use the async in the platform, you need to trust 100% your code will finish execution, because otherwise you might slowly end up with n async threads that kill your system.

That's one of the issues that are not visible that much when you use async: they spawn completely new threads which don't end up in a queue and are not controlled by any subsystem.

3 replies

Jun 13, 2022 10:51 AM UTC

Hi @seanccc ,

 

have you ever figured out? I also would like to call a Service asynchronously which is not marked as such.

 

Thank you
Benny

Jun 13, 2022 1:53 PM UTC

Nope.

Do note that even if you use the async in the platform, you need to trust 100% your code will finish execution, because otherwise you might slowly end up with n async threads that kill your system.

That's one of the issues that are not visible that much when you use async: they spawn completely new threads which don't end up in a queue and are not controlled by any subsystem.

Jun 14, 2022 7:09 AM UTC

Got it, thank you very much for your immediate feedback.