News for hackers. Stuff that matters.
Re:C++11 async tutorial by JoeAltmaier on Thursday October 18, 2012 @02:20PM (#4670181)
Thread switch time does not scale to the # of threads involved. Switching between 100 threads each blocked on i/o is exactly as efficient time-wise as switching between two threads ping-ponging the same i/o.

Memory footprint is somewhat applicable - often each has a (virtual) megabyte stack. So in 32-bit address mode you could run out of virtual memory!

Re:C++11 async tutorial by exDM69 on Friday October 19, 2012 @03:40AM (#4672633)
> Thread switch time does not scale to the # of threads involved.

True, but the number of context switches does increase and that in turn decreases the ratio of useful work vs. context switch overhead.

Also the secondary costs of context switching, like flushing caches increase. If there are hundreds of threads, the chances that a thread is woken up with warm caches decreases.

Re:C++11 async tutorial by JoeAltmaier on Thursday October 25, 2012 @11:43AM (#4698017)
Again, my point Was that context switching is identical. That is equal to the # io completions and nothing else.