
Enables true parallelism by providing a common `Thread` class and synchronization primitives. Includes utilities for CPU info, thread management, locks, futures, and integration with concurrency libraries.
Common Thread class (and snychronization primitives) for Kotlin/Multiplatform.
This allows true, pure parallelism in Kotlin where controlling an OS thread directly is feasable.
The library also offers various utilities and integration with other libraries.
Processor as a general purpose abstraction for accessing CPU related information
Thread as a general purpose wrapper around system threads
java.lang.Thread on JVM/AndroidMutex as a simple mutex implementationSharedMutex as a reentrant read-write lock implementationExecutor interface for bridging different APIsThreadPool as a simple work-stealing thread pool implementation
Executor
Future interface for unifying awaitable objectsCompletableFuture type with atomic state as a default Future implementation
Executor and a blockExecutor as a JVM Executor
Executor as a CoroutineDispatcher
Deferred<T> as a Future<T>
CompletableFuture.asyncSuspend to create awaitable objects from a suspend blockFuture.awaitSuspend to await any future by yielding the coroutineMore features may be added in the future. Contributions are welcome! :)
First, add the official Karma Krafts maven repository to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}Then add a dependency on the library in your buildscript:
kotlin {
commonMain {
dependencies {
implementation("dev.karmakrafts.filament:filament-core:<version>")
}
}
}Common Thread class (and snychronization primitives) for Kotlin/Multiplatform.
This allows true, pure parallelism in Kotlin where controlling an OS thread directly is feasable.
The library also offers various utilities and integration with other libraries.
Processor as a general purpose abstraction for accessing CPU related information
Thread as a general purpose wrapper around system threads
java.lang.Thread on JVM/AndroidMutex as a simple mutex implementationSharedMutex as a reentrant read-write lock implementationExecutor interface for bridging different APIsThreadPool as a simple work-stealing thread pool implementation
Executor
Future interface for unifying awaitable objectsCompletableFuture type with atomic state as a default Future implementation
Executor and a blockExecutor as a JVM Executor
Executor as a CoroutineDispatcher
Deferred<T> as a Future<T>
CompletableFuture.asyncSuspend to create awaitable objects from a suspend blockFuture.awaitSuspend to await any future by yielding the coroutineMore features may be added in the future. Contributions are welcome! :)
First, add the official Karma Krafts maven repository to your settings.gradle.kts:
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}Then add a dependency on the library in your buildscript:
kotlin {
commonMain {
dependencies {
implementation("dev.karmakrafts.filament:filament-core:<version>")
}
}
}