A spinning circle requires just two threads, one to do the work and one to spin the circle. And they don’t have to talk to each other.
A progress bar is the same thing, but now the work thread has to periodically communicate the progress to the bar thread, and inter-thread synchronization has to be setup. And how do you know how much progress a single file transfer represents? Or how many progress points is a registry edit versus a file transfer? It’s hard to figure out in advance, which is why so many progress bars are shitty estimates of progress.
A spinning circle requires just two threads, one to do the work and one to spin the circle. And they don’t have to talk to each other.
A progress bar is the same thing, but now the work thread has to periodically communicate the progress to the bar thread, and inter-thread synchronization has to be setup. And how do you know how much progress a single file transfer represents? Or how many progress points is a registry edit versus a file transfer? It’s hard to figure out in advance, which is why so many progress bars are shitty estimates of progress.
I mean we used to just put them on the same thread and block the window message handling loop, causing Windows to freak out. And we liked it.