mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 15:13:12 -04:00
Better error if neither single_threaded or multi_threaded features is on
This commit is contained in:
@@ -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`].
|
||||
|
||||
Reference in New Issue
Block a user