Tech Off Post

Single Post Permalink

View Thread: .NET in a multi-core processor world?
  • User profile image

    DigitalDud wrote:
    AndyC wrote: 
    Klaus Enevoldsen wrote: 

    This means that every time a program is doing something that could be done concurrently one should always start different threads (unless all threads depends on the same resources e.g. IO)

    Not quite. There is some overhead in spawning a thread so doing it for short lived tasks may be inefficient. Also, creating too many threads may degrade performance.

    If you need to thread a whole bunch of short-lived tasks you should consider using the thread pool.

    Great advice. Check Jeffrey Richter's MSDN article for some good advice using threadpool (every app already has one available).