DELAPARRA
Index
Color
NL
Category: Programming paradigms

Task Parallelism

Explained by Updated

What is Task Parallelism?

Task Parallelism: Different, independent tasks run simultaneously — e.g. resizing an image while compressing another. Task parallelism means running different, independent tasks at the same time. While one worker resizes images, another sends emails and a third generates a report. It differs from data parallelism, where the same operation is applied to many pieces of data. Here the tasks themselves are different, and they simply do not depend on each other.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Task Parallelism

What should you keep in mind with Task Parallelism?

In web applications, queues give you task parallelism naturally. Separate queues for emails, exports and integrations, each with its own workers, keep a slow export from delaying password reset emails. In code, running independent API calls concurrently, with promises in JavaScript or concurrent HTTP requests in Laravel, can cut response times considerably. Be sure the tasks really are independent, or you trade speed for race conditions.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with T

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.