In practice, if you’re going to make me have to use a promise to, say, decrypt 1kB of data using AES, I’m just going to use a wasm implementation of AES instead of turning my code into callback soup.
So AES-NI is blocking by this definition, because it’s a set of CPU instructions. A crypto coprocessor that communicates with main CPU via a FIFO, OTOH, would not be blocking.
-
-
Compare: Canvas 2D is implemented (for now!) as immediate mode on CPU, so it’s blocking. WebGL is done with a coprocessor, so it *should* ideally be async. The fact that GL is largely not an async API is a pain point and it’s what Vulkan/WebGPU remedy.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Thanks. In a thought experiment where there is a 1996-era regexp coprocessor, though, I still would not have made regexp APIs (which could go exponential) be async, because async means shared mutable state event loop concurrency. So mutability seems relevant here. Wdyt?
-
Well…I would assume this hypothetical coprocessor wouldn’t actually share the same memory as the host? That would be a bizarre implementation… Pretty sure you’d need to make the API not based on shared memory, anyway.
- 7 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.