Templates for delegating work to multiple threads

I am updating a WinForms application that uses BackgroundWorker to do something useful at the click of a button.

The problem is that “something useful” is repeated sequentially through a long to-do list and can take quite a while.

I am thinking that a button click event creates several BackgroundWorkers instead of one, or if the current BackgroundWorker creates additional BackgroundWorkers to do the actual work.

Both approaches seem quite similar to me.

Are there any advantages / disadvantages for one? Is there a better way to do this?

+3
source share
1 answer

Parallel.For? (Parallel.For @msdn)

- Parallel...

PK: -)

+1

Source: https://habr.com/ru/post/1735336/


All Articles