Why is Adapter::request_device() randomly using Futures? #5573
-
This is extremely frustrating, I'm trying to get a project started up and the first roadblock is some random unknowable decision that I have no control over and no easy way to work around. I thought I was going to be writing nice, familiar, sync code, and then for some reason So, wgpu people, why did you do this? Why did you create this torture? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You do not need to deal with raw wakers yourself;
One of the primary purposes of |
Beta Was this translation helpful? Give feedback.
You do not need to deal with raw wakers yourself;
pollster
neatly wraps all that up into an absolutely minimal but complete implementation of blocking on aFuture
.One of the primary purposes of
wgpu
is to be WebGPU — both an implementation of WebGPU, and an interface to the WebGPU API in browsers — and for that purpose, not justrequest_device()
, but everything that retrieves information from the GPU or OS is asynchronous (though not necessarilyasync
). The only blocking call anywher…