Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just to inform the reader, the experimental WebGPU API does embrace async communications with rendering devices: https://developer.mozilla.org/en-US/docs/Web/API/GPUDevice



It's still not the same, because of the way js async works


Curious why that is. How does V8 handle it differently?


V8 is asynchronous but single threaded, elixir gets m:n threaded. Job cancellation is trivial, safe, and automatically recovers the resource in elixir (the gpu devs have hooked cleanup in to the BEAM GC, because that is a thing). Moreover, if the caller of the agent asynchronously controlling the gpu is cancelled, it will also release the gpu automatically (in most cases, if you use the stdlib otp features instead of trying to build with primitives)


AFAIK V8 does make use of threads internally via libuv in order to make truly concurrent system calls. GPU device comms should fit perfectly in that design.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: