is the Atomics namespace object available in Kotli...
# javascript
a
a
I'm not sure (at least I didn't find such declarations inside kotlinx.browser and in kotlin-wrappers). For now, you could define it by yourself with
external
keyword like this:
Copy code
external object Atomics {
   ...
}
t
We will support it in Kotlin Wrappers. Issue cc @User
thank you color 3
👀 1
1
Implemented 😉 Expected in next release (probably tomorrow).
K 1
🎉 3
@Adam S Do you need
Atomics.waitSync
(not supported in Firefox)?
Released in Kotlin Wrappers
pre.585
🎉 1
a
thanks @turansky!
Atomics.waitSync
would be nice, but it’s not critical
t
Do you have examples how you will use
Atomics.waitSync
?
a
not yet, I’m still experimenting. But
Atomics.wait
doesn’t work on the main thread, only in web workers. So if I wanted to wait for a web worker to complete on a main thread I’d have to use a SharedArrayBuffer and
Atomics.waitSync
👍 1
or, that’s what I understand, I’m not 100% sure, and maybe there’s an alternative
t
Firefox support isn’t required? 😐
a
at the moment I’m just writing a test utility, so I can control the browser I use to test
Firefox support would be nice but I think that’s out of our control :)
👌 1
a
@turansky does the Kotlin Wrappers project have opt-in annotations for browser specific functionality? E.g.
Atomics.waitAsync
could be annotated with
@LimitedBrowserSupport
(or something similar)?
t
It can’t be absolute marker
We use similar strategy with TS declarations - supported in 2 main browsers (like in case of
Atomics
)
a
ah cool, thanks for the details
t
Release for
Atomics.waitAsync
requested
For result checks you can use
is/as
operators
WaitResult
children are classes
Released in
pre.589
🚀 1