Abstract


Caution

  1. When there is a shared resource, we are likely to Race Condition (竞态条件) and Deadlock (死锁)
  2. Overhead of creating Thread can be significant when we are having a lot, more threads means more Context Switch

Improved Responsiveness

Can continue to run other Thread while waiting for I/O operations to complete

Run other Thread while one Thread is waiting

Improved Performance

Huge amount of performance gain is guaranteed when tasks are stateless, independent of each other & long waiting time incurs in the task

Thread Safety (线程安全)