Search code examples
c#performancebackgroundworker

Why are BackgroundWorker's WorkerReportsProgress and WorkerSupportsCancellation's default values false?


Is there a performance penalty for using BackgroundWorker's WorkerReportsProgress and WorkerSupportsCancellation set to true? Is there some other reason for them to be false?

true would be more logical because if you don't want to implement them - just don't. true won't harm you.

I'm thinking of encapsulating BackgroundWorkers in a class (so I won't forget setting these properties to true, and for some other stuff). But since the default values are false, perhaps that indicates some disadvantage to them being true.


Solution

  • It seems that they're only to inform a calling program that it can't call them.