Description
Guarantee that the nested tasks will NOT run in parallel with other tasks
in another <exclusive>. Task container that guarantees that the nested tasks will
NOT run in parallel with other tasks that are nested in another ExclusiveTask.
This way, if tasks that would work in parallel are nested in ExclusiveTasks
forms critical sections.
Example:
<parallel task 1 of thread 1>
<parallel task 2 of thread 1>
<parallel task 3 of thread 1>
<parallel task 1 of thread 2>
<parallel task 2 of thread 2>
<parallel task 3 of thread 2>
<parallel task 1 of thread 3>
<parallel task 2 of thread 3>
<parallel task 3 of thread 3>
The tasks of each thread run sequentially, whereas the threads run in parallel.
In order to make sure that there are NO <parallel task 2 of thread X> running
simultaneously, we just do:
<parallel task 1 of thread 1>
<exclusive>
<parallel task 2 of thread 1>
</exclusive>
<parallel task 3 of thread 1>
<parallel task 1 of thread 2>
<exclusive>
<parallel task 2 of thread 2>
</exclusive>
<parallel task 3 of thread 2>
<parallel task 1 of thread 3>
<exclusive>
<parallel task 2 of thread 3>
</exclusive>
<parallel task 3 of thread 3>
Implementation class
net.mdatools.modelant.util.task.ExclusiveTask
Nested elements
Element |
Description |
Any task |
These are tasks to execute in exclusive mode, guaranteeing that no other parallel tasks
are running in exclusive mode |
Use <typedef resource="net/mdatools/modelant/util/antlib.xml"/>
Documentation generated by ant.doc Ant macro from ModelAnt by MDA Tools |