I thought this would be possibly in TeamCity but it seems not. What I want is a shared resource with custom values, where you can grab WRITE locks on any value, which then blocks builds from getting only that value. Unfortunately it seems you can only grab all values when requesting a Write lock. I'd also like the read locks to be able to grab any value not write locked up to a limit, similar to the single value lock.
Is there any way to achieve anything like this in TeamCity? We've got multiple independent databases for testing, there's no need to grab all of them for writing, but I'd like to prevent other jobs from reading when a job is writing to one of them.