Discover and read the best of Twitter Threads about #insidejava

Most recents (1)

What's it called when multiple threads execute at the same time? Parallelism? Concurrency? 🤔 Is there a difference? (Spoiler: Yes!)

Let me explain in a few tweets, ripping off @pressron's #InsideJava blog post "On Parallelism and Concurrency". 🧵

inside.java/2021/11/30/on-…
Parallelism:
Taking a task and splitting it up, so multiple CPUs can compute partial solutions in parallel to solve the task in less wall-clock time.

Concurrency:
Having a number of tasks that need to be arranged in a way that solves as many of them per $time_unit as possible.
Some parallelizable tasks:

* sorting an array
* inverting a matrix
* rendering graphics

Some examples for concurrency:

* processing incoming web requests
* making outbound calls to DB and/or other web services
* observe file system for changes
Read 11 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!