WebNN WG initiated a discussion with W3C TAG about naming convention for sync and async APIs (w3ctag/design-reviews#771). Some proposal from TAG is "if the main usage is sync, then x() and xAsync() seems preferable. If the main usage is async, then x() and xSync() seems preferable." (w3ctag/design-principles#402).
Most of WebGPU APIs are sync, but we still have some async APIs as below. Some of async APIs are suffixed with "Async", while most of them are not.
GPU.requestAdapter()
GPUAdapter.requestDevice()
GPUAdapter.requestAdapterInfo()
GPUDevice.createComputePipelineAsync()
GPUDevice.createRenderPipelineAsync()
GPUBuffer.mapAsync()
GPUShaderModule.compilationInfo()
GPUQueue.onSubmittedWorkDone()
GPUDevice.lost
GPUDevice.popErrorScope()
o we need to be consistent here, to put a suffix "Async" to all async APIs?
WebNN WG initiated a discussion with W3C TAG about naming convention for sync and async APIs (w3ctag/design-reviews#771). Some proposal from TAG is "if the main usage is sync, then x() and xAsync() seems preferable. If the main usage is async, then x() and xSync() seems preferable." (w3ctag/design-principles#402).
Most of WebGPU APIs are sync, but we still have some async APIs as below. Some of async APIs are suffixed with "Async", while most of them are not.
GPU.requestAdapter()
GPUAdapter.requestDevice()
GPUAdapter.requestAdapterInfo()
GPUDevice.createComputePipelineAsync()
GPUDevice.createRenderPipelineAsync()
GPUBuffer.mapAsync()
GPUShaderModule.compilationInfo()
GPUQueue.onSubmittedWorkDone()
GPUDevice.lost
GPUDevice.popErrorScope()
o we need to be consistent here, to put a suffix "Async" to all async APIs?