Or can we have asynchronous code that executes in the same thread.
Actually, yes, you can have async code that executes in the same thread. Most basic IO these days is actually asynchronous; reads and writes are requested and processed outside the CPU, when they are complete a flag is set and then the program can address the values. The program does this by occasionally checking the value of the flag during it's normal processing and responding when the value indicates availability. The operating system will typically coordinate this for higher-level programs.
That's a really dumbed down version of the truth, but it's correct enough for this discussion. For more reading, I suggest you start here:
http://en.wikipedia.org/wiki/Asynchronous_I/O
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With