C# Downloader: should I use Threads, BackgroundWorker or ThreadPool?

后端 未结 4 1187
遥遥无期
遥遥无期 2020-12-05 12:34

I\'m writing a downloader in C# and stopped at the following problem: what kind of method should I use to parallelize my downloads and update my GUI?

In my first att

4条回答
  •  没有蜡笔的小新
    2020-12-05 13:09

    By creating 4 different backgroundworkers you will be creating seperate threads that will no longer interfere with your GUI. Backgroundworkers are simple to implement and from what I understand will do exactly what you need them to do.

    Personally I would do this and simply allow the others to not start until the previous one is finished. (Or maybe just one, and allow it to execute one method at a time in the correct order.)

    FYI - Backgroundworker

提交回复
热议问题