<parallel> and <sequential>

The <parallel> and <sequential> tasks are container tasks that enable you to run sets of tasks in parallel or sequence. Each task nested within a parallel task is executed in its own thread. On the other hand, the tasks nested within a sequential task are executed one after another. Combining these elements enables you to run groups of tasks in parallel with each other. But, as is the case whenever threads are involved, care should be taken to avoid race conditions.

There are numerous examples in which these elements can be taken advantage of. They can be used to make the most of resources by running independent tasks in parallel, thus reducing build time.

Example

A very noteworthy example of the parallel task being ...

Get Ant Developer’s Handbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.