I just released the first snapshot 1.2.0.20 of my thread library for Kotlin/Multiplatform to Maven Central snapshots for early access. It allows interacting with raw system threads and synchronization primitives when raw parallelism is needed.
This build brings support for Android and JVM and extends native support to watchOS and tvOS.
https://git.karmakrafts.dev/kk/filament
K 3
Alexander Hinze
03/29/2025, 10:49 PM
Keep in mind that this is in no way meant to replace coroutines or suspend functions in the language, raw system threads should rather be able to co-exist with coroutines as long as they are not mixed (some interop is planned if that turns out to be useful).
m
Michael Paus
03/30/2025, 3:18 PM
Could you provide a use-case for that? Are coroutine Dispatchers not raw enough?
a
Alexander Hinze
03/30/2025, 3:29 PM
I am working on a game engine written in Kotlin/Native, and i would rather be able to handle a raw thread for applications like a real-time sound engine thread than to go through coroutine APIs. It is more lightweight too in those cases.
🙏 1
Alexander Hinze
03/30/2025, 3:31 PM
Another application within my personal interests would be bindings to native APIs which can utilize libpthread, which i use under the hood for all native targets.
s
Samuel Gammon
03/31/2025, 6:31 PM
This is really interesting @Alexander Hinze and we might be interested in using this, esp. with coroutines/threads integration, for one of our projects. I can connect with you over DM to see if it's a fit