Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminate blocking in Error() and Message() calls.
This serves two purposes. First, we want to (some day) convert these messages into a less obtrustive form, something like toaster notifications, such that they don't interrupt workflow as harshly. That would, of course, be nonblocking. Second, some platforms, like Emscripten, do not support nested event loops, and it's not possible to display a modal dialog on them synchronously. When making this commit, I've reviewed all Error() and Message() calls to ensure that only some of the following is true for all of them: * The call is followed a break or return statement that exits an UI entry point (e.g. an MenuX function); * The call is followed by cleanup (in fact, in this case the new behavior is better, since even with a synchronous modal dialog we have to be reentrant); * The message is an informational message only and nothing unexpected will happen if the operation proceeds in background. In general, all Error() calls already satisfied the above conditions, although in some cases I changed control flow aroudn them to more clearly show that. The Message() calls that didn't satisfy these conditions were reworked into an asynchronous form. There are three explicit RunModal() calls left that need to be reworked into an async form.
- Loading branch information
1 parent
396cac5
commit 4f7d721
Showing
10 changed files
with
76 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters