#Server Actions: Non-Blocking Behaviour?

3 messages · Page 1 of 1 (latest)

stiff mortar
#

So currently, by default, server actions are blocking.
By that, I mean that if the client executes >1 server action in quick succession, they will be queued, and each action will be called in order, only when the previous action resolves.

To put this more logically, let's imagine a client does the following:

serverAction() // 1
serverAction() // 2
serverAction() // 3

action 1 is called, once that is no longer pending, action 2 is called, once that finishes, then action 3 is called

Is there a way I can opt-out of the queueing behaviour and have all these actions run asynchronously?

ruby wyvernBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

thorn dagger
#

call one server actions and inside that server action call the logic that server actions 2 and 3 are calling inside of a Promise.all or Promise.allSettled