3 ms·
>Threads is a limited resource. Threads are expensive to create and dispose. Context switches are espensive. There is absolutely no reason they have to be. If
by Dylan16807 12y ago
>Threads is a limited resource. Threads are expensive to create and dispose. Context switches are espensive.
There is absolutely no reason they have to be. If you have an async callback API, you can plaster over it with green threads and they are very cheap, and don't have to involve any new context switches.
>Threads must be synchronized. Threads can have race conditions.
You don't have to allow your threads to run concurrently just because you added threads.