Need some clarification around concurrency

I’m a little confused by CircleCI’s concurrency, and I’m not clear on when workflows are executed in parallel.

I can specify the parallelism of a job with the parallelism option. If I want a lock a command to run on only one machine, I can use deploy instead of run. This is pretty straightforward.

However, what happens when there are two workflows queued? Are workflows executed in serial, or in serial for the same branch, or are they always executed in parallel? For example, if two commits occur in quick succession on the same branch, are two workflows executed simultaneously, or are they queued? If two commits are committed on two different branches, do the workflows execute simultaneously, or are they queued?

I haven’t been able to find any information in the documentation, but it could be that I’m looking in the wrong place.

It looks like multiple workflows are executed in parallel, and there doesn’t appear to be an option to force workflows to execute in serial, as is often necessary for deployments.

I ran across this post from a few years ago that introduces a script to do this, but it looks like it’ll block any running containers – hardly ideal!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.