Workspace Write Race Condition

Hello,

Maybe I missed it in the documentation, but I am unclear about what would happen if there were two jobs running concurrently that attempted to write files to the same “path” in a workspace persistence.

To be clear, I have a windows executor and a linux executor doing a C++ build. Both run simulatenously. Right now, windows takes much longer, so I feel like my risk is low. However, I am wondering if both jobs were to do “persist_to_workspace” at the same time for path “artifacts/”, what would happen? Is there any locking mechanism that would delay one job while the first job writes to it?

In my use case, the order they are written does not matter - it only matters that it works. The next job that runs joins the concurrency in order to utilize the artifacts produced by those two concurrent builds.

Thanks!