1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-03 15:20:05 -04:00

Remove the single_threaded/multi_threaded feature flags (#1390)

Always use parking_lot for mutexes, i.e. always be multi-threaded.

Closes #1379
This commit is contained in:
Emil Ernerfeldt
2022-03-21 22:20:37 +01:00
committed by GitHub
parent 5c68edbb15
commit 15254f8235
15 changed files with 21 additions and 120 deletions

View File

@@ -27,7 +27,7 @@ all-features = true
[features]
default = ["default_fonts", "multi_threaded"]
default = ["default_fonts"]
# implement bytemuck on most types.
convert_bytemuck = ["bytemuck", "emath/bytemuck"]
@@ -47,23 +47,16 @@ mint = ["emath/mint"]
# implement serde on most types.
serialize = ["serde", "ahash/serde", "emath/serde"]
single_threaded = ["atomic_refcell"]
# Only needed if you plan to use the same fonts from multiple threads.
# It comes with a minor performance impact.
multi_threaded = ["parking_lot"]
[dependencies]
emath = { version = "0.17.0", path = "../emath" }
ab_glyph = "0.2.11"
ahash = { version = "0.7", default-features = false, features = ["std"] }
atomic_refcell = { version = "0.1", optional = true } # Used instead of parking_lot when you are always using epaint in a single thread. About as fast as parking_lot. Panics on multi-threaded use.
bytemuck = { version = "1.7.2", optional = true, features = ["derive"] }
cint = { version = "^0.2.2", optional = true }
nohash-hasher = "0.2"
parking_lot = { version = "0.12", optional = true } # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios.
parking_lot = "0.12" # Using parking_lot over std::sync::Mutex gives 50% speedups in some real-world scenarios.
serde = { version = "1", optional = true, features = ["derive", "rc"] }
[dev-dependencies]