loke
01/01/2025, 3:57 PMrunBlocking
. The JS code in question runs in a webworker, and blocking is not a problem. In fact, I want it to block. Is there some way I can implement a runBlocking
that will work in JS? I only care about two usecases for JS: When running as a server using node.js, and when running in a webworker. In both of these cases, blocking is fine.ephemient
01/01/2025, 4:00 PMloke
01/01/2025, 4:01 PMloke
01/01/2025, 4:01 PMephemient
01/01/2025, 4:04 PMloke
01/01/2025, 4:05 PMephemient
01/01/2025, 4:05 PMsuspend fun main
on JS which is pretty close to the top-level async you can get in nodejsloke
01/01/2025, 4:06 PMAtomic
instances to implement the blocking file transfer between threads. It was terrible, and I don't want to build something like that again.ephemient
01/01/2025, 4:06 PMsuspend
loke
01/01/2025, 4:06 PMloke
01/01/2025, 4:07 PMloke
01/01/2025, 4:08 PMephemient
01/01/2025, 4:19 PMsuspend
functions when nothing suspends. if something does suspend, you have to pay that cost regardlessloke
01/01/2025, 4:19 PMloke
01/01/2025, 4:20 PMloke
01/01/2025, 4:21 PMturansky
01/01/2025, 9:36 PMloke
01/02/2025, 1:03 PMephemient
01/02/2025, 8:59 PMturansky
01/02/2025, 9:23 PMI couldn't access any syncronous file access API's from a webworkerIn dedicated web worker we have FileSystemSyncAccessHandle - it's worker specific.
turansky
01/02/2025, 9:25 PM