Better error if neither single_threaded or multi_threaded features is on
This commit is contained in:
parent
52e49bd4ae
commit
976260c2bd
2 changed files with 4 additions and 1 deletions
|
@ -47,7 +47,7 @@ cint = ["epaint/cint"]
|
|||
|
||||
persistence = ["serde", "epaint/persistence", "ron"]
|
||||
|
||||
# Only needed if you plan to use the same egui::Context from multiple threads.
|
||||
# multi_threaded is only needed if you plan to use the same egui::Context from multiple threads.
|
||||
single_threaded = ["epaint/single_threaded"]
|
||||
multi_threaded = ["epaint/multi_threaded"]
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
//!
|
||||
//! When the `single_threaded` feature is on the mutexes will panic when locked from different threads.
|
||||
|
||||
#[cfg(not(any(feature = "single_threaded", feature = "multi_threaded")))]
|
||||
compile_error!("Either feature \"single_threaded\" or \"multi_threaded\" must be enabled.");
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/// The lock you get from [`Mutex`].
|
||||
|
|
Loading…
Reference in a new issue