What is technical the difference between a thread and an async-operation?

929 views

I assume that two threads are working on a single cpu like this:

| Thread1 | Thread2 |
|———|———|
| a1 | b1 |
| a2 | b2 |
| a3 | b3 |

And are batched like this on the CPU

a1-b1-a2-b2-a3-b3

In: Technology

4 Answers

Anonymous 0 Comments

A thread is a *long-lived* independent running part which is *initiated by the main program*, for example receiving traffic from a network device and once it has received enough, inform the main program that the data is there.

An asynchronous operation is a *short-lived* independent running *stub part* which can be initiated by anything, for example the writing of analysed data to disk.

Now it is fair to say that asynchronous operations are threads also and could be implemented as threads by the coder too and that is 100% true. It is just that their purpose is different (Long lived versus long lived) and where they are started (main program versus at the end of some process).

You are viewing 1 out of 4 answers, click here to view all answers.