|
|
|
|
|
by tightbookkeeper
585 days ago
|
|
But most windows 98 era Ui programs were 1 or 2 threads…. You just handle events in order in a loop. It works and is far more responsive than what we have today. > Disks are certainly not quick enough to have File.Delete(...) be blocking What if you invoke a delete and then it fails and you want the user to respond? What will the state of your UI be when that happens? |
|
If you can't do anything else until you know whether it was a success or failure, then you ensure that. E.g. you disable every single button that allows the user to do something else before the previous operation completes. Basically the theory is usually that you can allow the UI to "read" the program state while a "write" operation is still in flight. Typically this results in the user being able to for example scroll a document so it re-renders correctly etc. After the in-flight operation succeeds/fails, you can show the user the message if required, then enable new operations to happen. But the UI never stopped pumping messages so it was always responsive at least.