Question: what is the difference between thread and function?
Answer: The primary difference is that threads within the same process run in a shared memory space, while processes run in separate memory spaces. ... But, like process, a thread has its own program counter (PC), register set, and stack space.