Why are Asynchronous processes not called Synchronous?

前端 未结 9 2092
我寻月下人不归
我寻月下人不归 2020-12-28 14:46

So I\'m a little confused by this terminology.

Everyone refers to \"Asynchronous\" computing as running different processes on seperate threads, which gives the illu

相关标签:
9条回答
  • 2020-12-28 15:18

    Many of the answers here are not correct. IN-dependently has a beginning particle that says NOT dependently, just like A-synchronous, but the meaning of dependent and synchronous are not the same! :D

    So three dependent persons would wait for an order, because they are dependent to the order, but they wait, so they are not synchronous.

    In english and any other language with common roots with a, syn and chrono (italian: asincrono; spanish: asincrónico; french: asynchrone; greek: a= not syn=together chronos=time)it means exactly the opposite.

    The terminology is UTTERLY counter-intiutive. Async functions ARE synchronous, they happen at the same time, and that's their power. They DO NOT wait, they DO NOT depend, they DO NOT hold the user waiting, but all those NOTs refer to anything but synchronicity :)

    The only answer possibly right is the CLOCK one, although it is still confusing. My personal interpretation is this story:

    "A professor has an office, and he makes SYNCHRONOUS CALLS for students to come. He says out loud in the main university hall: 'Hey guys who wants to talk to me should come at 10 in the morning tomorrow.', or simply puts a sign saying the same stuff.

    RESULT: at 10 in the morning you see a long queue. People had the same time so they came in in the same moment and they got "piled up in the process". So the professor thinks it would be nice for students not to waste time in the queue (and do synchronous operations, that is, do parallel stuff in their lives at the same time, and that's where the confusion comes).

    He decides students can substitute him in making ASYNCHRONOUS CALLS, that is, every time a student ends talking with him, the students may, e.g., call another student saying the professor is free to talk, in a room where students may do whatever they like in the meantime. So every student does not have a single SYNCHRONOUS CALL (10 in the morning, the same time for all) but they have 10, 10.10, 10.18, 10.27.. etc. according to the needed time for each discussion in the professor office."

    Is that the meaning of having the same clock, @Guffa?

    0 讨论(0)
  • 2020-12-28 15:21

    Your second definition is more helpful here:

    2. [...] having each operation started only after the preceding operation is completed.
    

    When you make an asynchronous call, that call might not be completed before the next operation is started. When the call is synchronous, it will be.

    0 讨论(0)
  • 2020-12-28 15:27

    It really means that an asynchronous event is happening independently of other events whereas a synchronous event would be happening dependent of other events.

    0 讨论(0)
  • 2020-12-28 15:29

    I think there's a slant that is slightly different to most of the answers here.

    Asynchronous means "not happening at the same time".

    In the specific case of threading:

    • Synchronous means "execute this code now".
    • Asynchronous means "enqueue this work on a different thread that will be executed at some indeterminate time in the future"

    This usually allows you to "do two things at once" because of reasons like:

    • one thread is just waiting (e.g. for data to arrive on a serial port) so is asleep
    • You have multiple processors, so the two threads can run concurrently.

    However, even with 128 processor cores, the case is the same: the work will be executed "at some time in the future" (if perhaps the very near future) rather than "now".

    0 讨论(0)
  • 2020-12-28 15:32

    The word "synchronous" implies that a function call will be synchronized with some other event.

    Asynchronous implies that no such synchronization occurs.

    It seems like the definition that you have there should really be the definition for "concurrent," or something. That definition looks wrong.


    PS:

    Here is the wiktionary definition:

    asynchronous

    1. Not synchronous; occurring at different times.
    2. (computing, of a request or a message) allowing the client to continue during processing.

    Which just so happens to be the exact opposite of what you posted.

    0 讨论(0)
  • 2020-12-28 15:35

    I would guess it's because they are not synchronized ;)

    In other words... if one process gets stopped, killed, or is waiting for something, the other will carry on

    0 讨论(0)
提交回复
热议问题