-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try very hard to guard against all possible misuses of
Thread
Prior to this commit, it was still possible to trigger panics in `Executor` methods by misusing `Thread` and `Executor` in clever ways. For example, by setting a single `Thread` as the main thread of *two* `Executor`s, you could end up in a situation where you could artificially make the main `Thread` of one executor have any arbitrary mode, and this could trigger `unreachable!()` panics. Now, we try much harder to guard against all of these possible situations. We add a *new* error condition to `Executor::step` which is purposefully *outside* of the normal Lua error handling, since it indicates a probable bug in the Rust-side use of an `Executor`. Normal `piccolo` code which uses `Executor` directly will probably always want to *unwrap* this error, since it shouldn't be possible to cause this error with correct `piccolo` use in normal cases.
- Loading branch information
Showing
9 changed files
with
106 additions
and
83 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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