Reading these BackgroundWorker vs. ThreadPool vs. Thread tips, I decided to go with BackgroundWorker.
I know how to create such a thread by dragging-and-dropping its component from the Toolbox into my form, but since I need multiple such threads (a finite number between 10-20), I am not sure what the correct way to approach this is:
- Drag and drop 10-20 of them, creating placeholders for them in code, but only start those that need to run, depending on application needs (in different scenarios I could run as little as 1-2 our of those 10-20 threads).
or
- Create those BackgroundWorkers programmatically (somewhat more involved)
I prefer the drag-and-drop approach but I am not experienced in BackgroundWorker and I am not sure what the tradeoffs could be.
Any tips from experienced BackgroundWorker programmers?