A thread is an execution context, which is all the information a CPU needs to execute a stream of instructions. It controls what executes in what order.
When using threads, CPU gives you the illusion that it’s doing multiple computations at the same time. It does that by spending a bit of time on each computation.
Threads are like two people using the same computer, who don’t have to share data explicitly but must carefully take turns. Conceptually, threads are just multiple worker bees buzzing around in the same address sapce. Each thread has its own stack, its own instructor pointer(aka program counter), etc. , but all threads in a process share the same memory.
You can kill one thread and others will still be running.
Android’s user interface thread
1.1 Main Thread
Android modifies the user interface and handles input events from one single user interface thread. This…
View original post 786 more words