gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 548 forks source link

Prevent accessing NSView from other threads #3704

Closed kvark closed 3 years ago

kvark commented 3 years ago

See https://github.com/gfx-rs/wgpu-rs/issues/816#issuecomment-809733856 It's hard to investigate if anybody hits this. We should error out on this if we know that a different thread is trying to access the view. I.e. we'd remember the thread that created a surface, and we'd compare it to the thread that calls configure_swapchain.