- Typically threads are relatively expensive to create and also consume significant resources
- E.g. on NT, by default, each thread is allocated 2MB of heap space
- simple container implementation:
- Receive incoming request
- Create thread
- Have thread execute method
- Get result
- Destroy thread
- Two problems:
- Constant creation & destruction of threads
- May exhaust memory under heavy load
|