Parallel is a container task - it can contain other Ant tasks. Each nested task within the parallel task will be executed in its own thread.
Parallel tasks have a number of uses in an Ant build file including:
Care must be taken when using multithreading to ensure the tasks within the threads do not interact. For example, two javac compile tasks which write classes into the same destination directory may interact where one tries to read a class for dependency information while the other task is writing the class file. Be sure to avoid these types of interactions within a <parallel> task
The parallel task has no attributes and does not support any nested elements apart from Ant tasks. Any valid Ant task may be embedded within a parallel task, including other parallel tasks.
Note that while the tasks within the parallel task are being run, the main thread will be blocked waiting for all the child threads to complete.
If any of the tasks within the <parallel> task fails, the remaining tasks in other threads will continue to run until all threads have completed. In this situation, the parallel task will also fail.
The parallel task may be combined with the sequential task to define sequences of tasks to be executed on each thread within the parallel block