Name of an environment variable that will receive the comma separated list of the names of the locked resources while the block executes.

e.g.:

lock(label: 'label', variable: 'var') {
    echo "Resource locked: ${env.var}"
}