Concurrency and Throttling in workflows

What is the best way to manage concurrency and throttling in workflows.
I know that I can use a var as a bool, change it at the beginning and at the end of the workflow. This is pretty manual and prone to errors.

The use case, for example is a submit form. User may press ‘enter’ more than one in a 1second period.

Is there any better or more sophisticated way to do it?

What we usually do is to change a variable at the start of the workflow, and use it to disabled the button or the form (you can even display a loader)

then at the End or Error of the workflow you have to change it again, right?

Yes, thats exactly how you do it. Its hard to find something generic, because every form or action has their own logic (you may want to block several actions for example).

Then, this would be a feature request to add a concurrency parameter in workflows.

I imagine a parameter in workflows that say: “Block concurrent requests to this workflow” yes/no.

This way I don’t have to be changing and reseting variables in every workflow that do stuff outside of the front-end. In multiple parts of a workflow

Alternatively, add a native way to see if a workflow is running or not.