Skip to content

Commit

Permalink
Merge pull request #1 from xvrqt/master
Browse files Browse the repository at this point in the history
Hid SETUP.is_complete() behind a cfg Nightly flag. Should compile now.
  • Loading branch information
xvrqt committed Mar 26, 2020
2 parents 29c3317 + 0bdf7f1 commit 5b5ea89
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/lib.rs
Expand Up @@ -3,7 +3,7 @@
//!
//! ## Quick Start
//! ```no_run
//! use addy::SIGWINCH;
//! use addy::SIGWINCH;
//! use std::io::{Read, stdin};
//! fn main() -> Result<(), addy::Error> {
//! /* SIGWINCH is a POSIX interrupt signal for window resized */
Expand Down Expand Up @@ -1090,14 +1090,20 @@ fn setup() {

/* If the thread closes - set all the singals back to their default
* behavior and remove all callbacks.
*/
*/
set_all_to_default();
}); // </Thread>
}); // </Once>

/* There's a chance that the ONCE call actually initialized something else
* and that we're not ready so we spin until we are.
*/
* and that we're not ready so we spin until we are. Probably not necessary.
*
* Apparently it's only available on nightly, but is merged in and will be
* stable shortly. See link below for detail:
*
* Link: https://github.com/rust-lang/rust/issues/54890
*/
#[cfg(feature = "nightly")]
while !SETUP.is_completed() { /*-- ᓚᘏᗢ --*/ }
}

Expand Down

0 comments on commit 5b5ea89

Please sign in to comment.