Skip to main content
17-Peridot
August 2, 2020
Solved

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

  • August 2, 2020
  • 2 replies
  • 1492 views

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

Best answer by VladimirRosu_116627

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.

2 replies

16-Pearl
June 13, 2022

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

19-Tanzanite
June 13, 2022

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.

16-Pearl
June 14, 2022

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