Skip to content

Multithreading guarantees? #261

Closed Answered by cwfitzgerald
PJB3005 asked this question in Q&A
Discussion options

You must be logged in to vote

It's thankfully much less strict. All types in wgpu-native are Send and Sync meaning they can be freely moved across threads. Additionally, most types operate on shared references, meaning you can use the concurrently without mutexes. The only exception is CommandEncoder/RenderPass which operate on unique references, meaning you need to synchronize access across threads.

webgpu-native is, on paper, the same, but I don't know what dawn's situation with threading is right now.

Threading on the web is a lot more complicated, so it makes sense they punted it off of v1

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PJB3005
Comment options

Answer selected by PJB3005
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants