Почему Асинхронные процессы не называют Синхронными?

StringWriter outStream = new StringWriter();
XmlSerializer s = new XmlSerializer(typeof(List<List<string>>));
s.Serialize(outStream, myObj);
properties.AfterProperties["myNoteField"] = outStream.ToString();
24
задан John Gietzen 20 October 2009 в 19:04
поделиться

7 ответов

It means that the two threads are not running in sync, that is, they are not both running on the same timeline.

I think it's a case of computer scientists being too clever about their use of words.

Synchronisation, in this context, would suggest that both threads start and end at the same time. Asynchrony in this sense, means both threads are free to start, execute and end as they require.

10
ответ дан 29 November 2019 в 00:06
поделиться

Слово «синхронный» подразумевает, что вызов функции будет синхронизирован с некоторым другим событием.

Асинхронный означает, что такой синхронизации не происходит.

] Похоже, что у вас есть определение, которое действительно должно быть определением для "одновременного" или чего-то в этом роде. Это определение выглядит неверным.


PS:

Вот определение викисловаря:

асинхронный

  1. Не синхронный; происходящие в разное время.
  2. (вычисление, запрос или сообщение), позволяющее клиенту продолжить во время обработки.

Что, как раз так случилось, точная противоположность тому, что вы опубликовали.

9
ответ дан 29 November 2019 в 00:06
поделиться

I believe that the term was first used for synchronous vs. asynchronous communication. There synchronous means that the two communicating parts have a common clock signal that they run by, so they run in parallel. Asynchronous communication instead has a ready signal, so one part asks for data and gets a signal back when it's available.

The terms was then adapted to processes, but as there are obvious differences some aspects of the terms work differently. For a single thread process the natural way to request for something to be done is to make a synchronous call that transfers control to the subprocess, and then control is returned when it's done, and the process continues.

An asynchronous call works just like asynchronous communication in the aspect that you send a request for something to be done, and the process doing it returns a signal when it's done. The difference in the usage of the terms is that for processes it's in the asynchronous processing that the processes runs in parallel, while for communication it is the synchronous communication that run in parallel.

So "computer or electrical machine" is really a too wide scope for making a correct definition of the term, as it's used in slightly different ways for different techniques.

5
ответ дан 29 November 2019 в 00:06
поделиться

Я думаю, что есть наклон, который немного отличается от большинства ответов здесь.

Асинхронный означает «не происходит в одно и то же время».

В конкретном случае потоковой передачи:

2
ответ дан 29 November 2019 в 00:06
поделиться

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

2
ответ дан 29 November 2019 в 00:06
поделиться

Ваше второе определение здесь более полезно:

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

Когда вы выполняете асинхронный вызов, этот вызов может не быть завершен до того, как будет запущена следующая операция. Когда вызов будет синхронным, он будет.

1
ответ дан 29 November 2019 в 00:06
поделиться

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
ответ дан 29 November 2019 в 00:06
поделиться
Другие вопросы по тегам:

Похожие вопросы: