When the resource is defined and the locks are added, the build gets a configuration parameter with the name of the lock and with the value of the resource string (
teamcity.locks.writeLock.<lockName>), e.g. the parameter name can be:
Locks for resources in composite builds
Shared resources can now be locked for composite builds as well. A lock on the specified resource will be acquired when a composite build starts (when the first build of the composite build chain starts); the lock will be released when the composite build finishes (the last build in its chain is finished).
The locks acquired on composite builds affect only these composite builds and are not propagated to their individual parts.
For example, if a resource has a quota of N, then N composite builds that have a read lock on this resource can be run concurrently. The number of concurrent individual builds inside these composite builds will not be affected by the resource quota.
Viewing Shared Resources Usage