Simultaneous Function Stack

Options

Is there a way to run multiple action in a single function stack at the same time?

Comments

  • Lachlan
    Lachlan Administrator

    ADMIN

    Options

    Hi Peter,

    Currently, we haven't yet got support to run multiple actions simultaneously via the same function. This is something we'd like to make available in the future but isn't available yet, unfortunately!

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Options

    As Lachlan points out, any given function stack is single-threaded, so one thing happens at a time.

    However.

    From any given function stack you can trigger multiple endpoints to run your code simultaneously or nearly so. You can do this by running an external API endpoint back into your own Xano instanceto handle this "subtask" with a timeout of 1s. That way it will trigger subtask 1, wait a second, trigger subtask 2, etc.

    If you don't want the sequencing, you can also fire off the requests more simultaneously (e.g. without the 1s delay) by doing so from a Lambda.

    Others solve your stated need by following one of the two approaches above. It's definitely a more advanced move, the kind we work on daily in our State Change office hours and loom-enabled forum.