2

In English, the word synchronous means "happening at the same time" while the word asynchronous means the opposite (i.e. "not simultaneous or concurrent in time : not synchronous")

Why all references refer to parallel programming as asynchronous programming instead of synchronous programming like this one And why they all use the keyword async (which is an abbreviation of asynchronous) instead of sync.

For example:

  • If I have 2 consecutive methods Method1() and Method2() respectively, thenMethod2() will not start execution till Method1() finishes processing, which we call sequential processing.
  • If both Method1() and Method2() are marked with async keywords, this means Method2() will start processing without waiting for Method1() to finish.
  • So, I can describe this as parallel calling, concurrent calling, synchronous call, or anything indicating they run together without waiting.
  • Naming the second scenario Asynchronous gives an impression that they are not processing in parallel.

This if confusing, isn't it?

I am not a native English speaker, am I missing something in the English language or in the parallel programming concept?

5
  • 2
    Here, asynchronous means without synchronicity, i.e. you start an operation that then proceeds asynchronously. Commented Jan 1, 2019 at 13:09
  • 1
    In parallel programming (or multithreading) threads are executed independently of each other and might be done with their job at completely different times. They are not in sync or not synchronised with each other so they are asynchronous. synchronous is not a term used in this context the same way as asynchronous. Commented Jan 1, 2019 at 13:15
  • 1
    The "not simultaneous or concurrent in time" that asynchronous means in this case is not referring to the independent tasks, which may in fact be executing concurrently. It's referring to the relationship of the asynchronous subroutine with its caller: the result of the subroutine is "not simultaneous or concurrent" with the code that called it. Commented Jan 1, 2019 at 16:43
  • We don't! You can have asynchronous code that doesn't run in parallel. Commented Jan 1, 2019 at 21:25
  • 1
    This link clearly discuss that: dev.to/scotthannen/concurrency-vs-parallel-vs-async-in-net-3812 Commented Oct 8, 2019 at 14:20

1 Answer 1

0

Parallel programming implies concurrently executing activities. Today, two kinds of activities are used: threads and asynchronous procedures (coroutines are special kind of asynchronous procedures). Both kinds of activities can coexist in the same program. If most or all activities are threads, then the program is called multithreaded. If most or all activities are asynchronous procedures, the program is called asynchronous. And if program consists of a single thread, then it is called synchronous. But most funny thing is when that single thread is executing asynchronous procedures (as, for example, the GUI thread in Java/Swing or Android does), the program is asynchronous at the same time!

Sign up to request clarification or add additional context in comments.

4 Comments

This is more confusing :), please check the example I added to the question to clarify the source of my initial confusion
Parallelism does not imply concurrency the same way concurrency does not imply parallelism.
@PauloMorgado others say "parallelism implies concurrency": medium.com/from-the-scratch/…
They are wrong. Concurreny means accessing the same resources at the "same" time. Code that does not access the same resources can run in parallel without concurrency. And code that accesses the same resources can run exculsivly and concurrently.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.