mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
Make WindowBuilder Send + Sync
Window builder is always accessed by winit on the thread event loop is on, thus it's safe to mark the data it gets as `Send + Sync`. Each unsafe object is marked individually as `Send + Sync` instead of just implementing `Send` and `Sync` for the whole builder.
This commit is contained in:
@@ -16,6 +16,11 @@ fn window_send() {
|
||||
needs_send::<winit::window::Window>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn window_builder_send() {
|
||||
needs_send::<winit::window::WindowBuilder>();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ids_send() {
|
||||
// ensures that the various `..Id` types implement `Send`
|
||||
|
||||
Reference in New Issue
Block a user