flexible-thread-pool-dispatcher

Auto-Scale threads CoroutineDispatcher

License

License

MIT
GroupId

GroupId

io.github.eaglesakura.flexible-thread-pool-dispatcher
ArtifactId

ArtifactId

flexible-thread-pool-dispatcher
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

flexible-thread-pool-dispatcher
Auto-Scale threads CoroutineDispatcher
Project URL

Project URL

https://github.com/eaglesakura/flexible-thread-pool-dispatcher
Source Code Management

Source Code Management

https://github.com/eaglesakura/flexible-thread-pool-dispatcher

Download flexible-thread-pool-dispatcher

Dependencies

compile (2)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.4.21
org.jetbrains.kotlinx : kotlinx-coroutines-core-jvm jar 1.4.1

Project Modules

There are no modules declared in this project.

What is this repository?

Auto-Scale supported CoroutineDispatcher.

Example.

// Max 4 thread(min 0 thread).
// Kee-Alive 1 seconds. 
val dispatcher =
    FlexibleThreadPoolDispatcher.newDispatcher(4, 1, TimeUnit.SECONDS)

withContext(dispatcher) {
    // do something.
}

How to Install

// build.gradle
dependencies {
    implementation 'io.github.eaglesakura.flexible-thread-pool-dispatcher:flexible-thread-pool-dispatcher:1.0.+'
}

Versions

Version
1.0.0
1.0.0-rc01