Learning the mechanics of the Rune Code Async block

I understand the “Run Code Async” block in the Logic section is Backendless’ version of paralell flows/actions. However, I’m not sure I understand how it works exactly and haven’t been able to find much documentation. A few questions I have:

  • Will the blocks inside of the async wait until the blocks above the Async have run before starting?
  • Will the blocks after the async wait until the blocks inside the async have completed?
  • Is it that all of the blocks inside the Async block run simultaneous with each other?
  • And/or is it that everything inside the Async runs simultaneously with the entire action flow?

Hello @David_King

  1. yes
  2. no
  3. no
  4. didn’t get your question

Async block works like another thread, everything inside one async block will be ignored by a main thread(it will not wait), but still have priority inside it.

Here is an example:

image

And call order:
myFunction1 - start
myFunction1 - end
myFunction2 and myFunction4 - start
myFunction2 - end
myFunction3 - start

Regards, Dima

Hello @David_King

It’s easier to explain with an example

Output: 1,2,3,4

Output: 1,2,4,3

In the first case, we have to wait for the result of the “Logout” request to call the “print 4”, in the second case, we do not wait for the response to the request to call the “print 4”

Regards,
Viktor