The lock itself must have been declared using
exclusive="yes"
is the default setting.
This means that the lock is made exclusive and that only one task can acquire the lock and start a task.
All other jobs with the same lock are added to a queue.
Jobs with exclusive="yes"
are started before jobs with exclusive="no"
.
exclusive="no"
only blocks exclusive use (exclusive="yes")
.
A task with exclusive="no"
only exclude tasks with exclusive="yes"
.
The total number of tasks with exclusive="no"
can be limited using
See also
<locks> <lock name="my_file"/> </lock> <job name="my_file_reader" tasks="3"> <lock.use lock="my_file" exclusive="no"/> … </job> <job name="my_other_file_reader"> <lock.use lock="my_file" exclusive="no"/> … </job> <job name="my_file_writer"> <lock.use lock="my_file"/> … </job>
The my_file_reader
and my_other_file_reads
jobs do not use the locks exclusively
and can run at the same time as other jobs.
The my_file_writer
job has an exclusive lock and can only run when no other job is running.
This job can change the data set and can be used with the certainty that
no other jobs will attempt to read the data while this job is running.
See also