Tech Off Post

Single Post Permalink

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

    the threadpool is your friend!!....

    A typical use where I personally use mutlithreading is in parsing flat files.... I have a directorywatcher watching a directory (in a windows service) that runs on its own thread.... each time it sees a new file it spawns a new thread to parse that file and upload it to a SQL db..... the parsing and uploading can take some time so threading allows me to parse multiple files at once (this cut the average parse time of 10+ files from a total of 30 seconds to an aprox 18sec total... IIRC)

    Remember its not just about Cores... its about logical processors.... HT-enabled procs/cores count as two processors....