Concurrency explained.
Concurrency shakes up sequential programming a little bit.
It mostly helps with resource allocation. Placed within our
example, you and a few friends are moving your boxes. Not all the boxes
have been fully packed yet, so you go grab the first fully packed box and
start moving it. While your doing this one of your friends is packing up another
box. They don't start lifting and moving their box, because you only have one
small moving truck and only one of you can comfortably place boxes into the
truck at a time. Once you're done placing your box in the truck, your friend
can then start moving their box without running into you. They also have free access
to the truck. Then another friend can go and grab their box and start packing it up to move.
This type of programming is helpful because it correctly
and efficiently manages access to shared resources. It allows two or
more tasks to start, run, and complete in overlapping time periods. This doesn't
mean they'll ever be running at the same instant. This way you and your friends
can finish packing a little bit faster, even if it still takes awhile.