-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
made "concurernvy vs. parallelism" section clearer #174
Conversation
For many people, the concept of concurrency vs. parallelism can be hard to grok. I do not think the old descriptin read very well, nor did I think it would be _that_ helpful to someone who needed the answer in the frirst place (i.e. someone who doesn't know the difference.) I tried writing an answer of my own before I realized that someone else had already put it best, so I quoted an aclaimed StackOverflow answer and gave appropiate credit (as Creative Commons requires). I think linking to a SO question will also make it easy for people to read other answers, which they may understand better.
Nice, I like clarifications, but I don't think he put it best. Mainly because the examples explain more than the descriptions, but introduces (probably unknown) terms: multitasking, single-core, multicore, processor. |
Concurrency is not parallelism. It enables parallelism. It's about dealing with, while parallelism is about doing, lots of things at once. | ||
Concurrency is not parallelism. It enables parallelism. | ||
|
||
**Concurrency** is when two tasks can start, run, and complete in overlapping time periods. It doesn't necessarily mean they'll ever both be running at the same instant. (e.g. multitasking on a single-core machine.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- two or more tasks?
- I wouldn't say starting and completing is necessary
- I'm not a native speaker, but I wouldn't use the word
when
in that context to express a condition.
Thanks for the input, @schnittstabil - I apprecaite it 😄. I completely agree that it should be "two ore more tasks" - I edited the original answer and this pull request in response. Bare in mind the answer has 400:heavy_plus_sign: positive responses which tells me the answer is useful. I think it reads fine, to be honest. What's more, because I have included a link to the SO thread someone can go there for additional context and alternative answers or analogies. |
Concurrency is not parallelism. It enables parallelism. It's about dealing with, while parallelism is about doing, lots of things at once. | ||
Concurrency is not parallelism. It enables parallelism. | ||
|
||
**Concurrency** is when two or more tasks can start, run, and complete in overlapping time periods. It doesn't necessarily mean they'll ever both be running at the same instant. (e.g. multitasking on a single-core machine.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two or more tasks can start, run, and complete in overlapping time periods, that is also true for Parallelism, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@schnittstabil As is stated: "concurrency enables parallism". Of course there is an overlap.
What do you suggest?
I think this information should not belong in the AVA's Readme. Project's readme is about project, not about explaining concepts. What I would do here, is to link to that stack overflow answer, instead of copying it. |
@vdemedes You know what, mate? That is a good idea. Done. |
I thought about that description and has come to the conclusion that it is at least misleading. Instead of covering these aspects they are messed up. Also the answer mentions Sun's Multithreaded Programming Guide, which (obviously) only talking about Threads and states that: Concurrency is a more generalized form of parallelism. That is only valuable in that guide, but can't be transferred to newer concepts used in Node or Go… |
@schnittstabil I meant to link to the question. |
For many people, the concept of concurrency vs. parallelism can be hard to grok.
I do not think the old descriptin read very well, nor did I think it would be that helpful to someone who needed the answer in the frirst place (i.e. someone who doesn't know the difference.)
I tried writing an answer of my own before I realized that someone else had already put it best, so I quoted an aclaimed StackOverflow answer and gave appropiate credit (as Creative Commons requires).
I think linking to a SO question will also make it easy for people to read other answers, which they may understand better.