How are pipelines queued?

On merging to master one of our pipelines was taking longer than expected to run, due to a docker image push/pulls taking longer than expected. The next merge to master actually ran and finished before the previous one. The result of this was that the ‘latest’ tag in the docker registry pointed to the last image to be pushed, which wasn’t actually the newest version.

Is there a way to have strict queuing for the pipelines for a particular branch?