Skip to content
This repository was archived by the owner on Jun 11, 2026. It is now read-only.

Commit 72d895a

Browse files
authored
Update README.md
1 parent f2c7891 commit 72d895a

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Chronos
22

3-
> Experiment & govern your threading layer with an iron-fist
3+
> Measure, experiment with & govern your threading layer with an iron-fist
44
55
Chronos (named after Greek god of time) is a thread orchestration, experimentation, monitoring and governance library for Android applications that work for large scale mobile apps. It enables a teams of developers on multiple features to utilise threading in a safe and controllable way.
66
- Addresses the thread explosion problem for large teams with a centralised threadpool management system.
@@ -11,7 +11,7 @@ Chronos (named after Greek god of time) is a thread orchestration, experimentati
1111

1212

1313
## Usage
14-
1. Create a BaseExecutorConfig for threadpools that would contain all the threadpools. Centralising this will ensure governance of background work is possible. Each Executor is represented by an ExecutorSetting and the name should be passed to the get() APIs to ensure this is used.
14+
**1.** Create a BaseExecutorConfig for threadpools that would contain all the threadpools. Centralising this will ensure governance of background work is possible. Each Executor is represented by an ExecutorSetting and the name should be passed to the get() APIs to ensure this is used.
1515
Please check ExecutorSettings for possible values and their defaults.
1616

1717
For eg, you can follow a [GCD](https://developer.apple.com/documentation/dispatch/dispatchqos) based threadpool approach for creating your threadling layer to run work on based on it's priority to the user like in iOS.
@@ -48,8 +48,7 @@ object BaseExecutorConfig : ExecutorConfig {
4848
}
4949
```
5050

51-
2. Initialise an EventStream and register collectors to collect ExecutorEvent and ExecutionEvents from these threadpools. The EventStreamConfig will decide the monitoring related
52-
settings we will be using for these events. For eg, we can decide to collect events only when the app is in debug mode or with apply backpressure to the collectors. Transformers can be applied to add more metadata to certain events or filter some out.
51+
**2.** Initialise an EventStream and register collectors to collect ExecutorEvent and ExecutionEvents from these threadpools. The EventStreamConfig will decide the monitoring related settings we will be using for these events. For eg, we can decide to collect events only when the app is in debug mode or with apply backpressure to the collectors. Transformers can be applied to add more metadata to certain events or filter some out.
5352

5453
All events collected pass through all the transformers to the collectors.
5554

@@ -70,28 +69,27 @@ All events collected pass through all the transformers to the collectors.
7069
)
7170
}
7271
}
73-
7472
```
7573

76-
3. Initialise Executors class with EventStream and BaseExecutorConfig. Please check Experiments section to see how this BaseExecutorConfig can also be modified at runtime.
74+
**3.** Initialise Executors class with EventStream and BaseExecutorConfig. Please check Experiments section to see how this BaseExecutorConfig can also be modified at runtime.
7775

7876
```kotlin
7977
private val executors = Executors(
8078
getExecutorConfig(args),
8179
getExecutorEventsConfig(args)
8280
)
83-
8481
```
8582

8683

87-
4.1. Use Executors class at all places to post work as coroutines in Kotlin
84+
**4.** Use Executors class at all places to post work as coroutines in Kotlin
8885
```kotlin
8986
CoroutineScope(executors.getExecutor(ExecutorName.USER_INITIATED).asCoroutineDispatcher()).launch {
9087
someCriticalWork()
9188
}
9289
```
9390

94-
4.2. Or Runnables in Java
91+
or runnables in Java
92+
9593
```java
9694
executors
9795
.getExecutor(ExecutorName.USER_INITIATED)

0 commit comments

Comments
 (0)