Skip to content

Commit ed392dd

Browse files
committed
Alexander review part 2
1 parent fb0919f commit ed392dd

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

docs/topics/kotlin-daemon.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,61 +46,61 @@ For more information, see [`kotlin.daemon.jvmargs` property](gradle-compilation-
4646

4747
There are two common lifetime strategies for the Kotlin daemon:
4848

49-
* **Detached daemon**: Used when the client (like a build system) is long-running. The daemon shuts down shortly after the
49+
* **Attached daemon**: Used when the client (like a build system) is long-running. The daemon shuts down shortly after the
5050
client process shuts down or the daemon hasn't been used for a while.
51-
* **Attached daemon**: Used when the client is short-lived (like command-line compilation). The daemon stays alive longer
51+
* **Detached daemon**: Used when the client is short-lived (like command-line compilation). The daemon stays alive longer
5252
to await potential follow-up requests.
5353

5454
To configure the lifetime strategy, you can use the following options:
5555

5656
| Option | Description | Default value |
5757
|-----------------------------|----------------------------------------------------------------------------------------------------|---------------|
5858
| `autoshutdownIdleSeconds` | How long the daemon should stay alive after the last compilation when a client is still connected. | 2 hours |
59-
| `autoshutdownUnusedSeconds` | How long the daemon waits to shut down after all clients disconnect. | 1 minute |
60-
| `shutdownDelayMilliseconds` | How long a newly started daemon waits for a first client before shutting down if unused. | 1 second |
59+
| `autoshutdownUnusedSeconds` | How long a newly started daemon waits for a first client before shutting down if unused. | 1 minute |
60+
| `shutdownDelayMilliseconds` | How long the daemon waits to shut down after all clients disconnect. | 1 second |
6161

62-
To configure a detached daemon lifetime, set `shutdownDelayMilliseconds` to a **high** value.
62+
To configure an attached daemon lifetime, set `autoshutdownIdleSeconds` to a **high** value and `shutdownDelayMilliseconds` to a **low** value.
6363

6464
<tabs group="build-system">
6565
<tab title="Gradle" group-key="gradle">
6666

6767
Add the following to your `gradle.properties` file:
6868

6969
```none
70-
org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=shutdownDelayMilliseconds=7200
70+
org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=autoshutdownIdleSeconds=7200,shutdownDelayMilliseconds=1000
7171
```
7272

7373
</tab>
7474
<tab title="Maven" group-key="maven">
7575

76-
Add the following property to your `pom.xml` file:
76+
Use the following command:
7777

78-
```xml
79-
<kotlin.compiler.daemon.shutdownDelayMs>7200</kotlin.compiler.daemon.shutdownDelayMs>
78+
```bash
79+
mvn package -Dkotlin.daemon.options=autoshutdownIdleSeconds=7200,shutdownDelayMilliseconds=1000
8080
```
8181

8282
</tab>
8383
</tabs>
8484

85-
To configure an attached daemon lifetime, set `autoshutdownIdleSeconds` to a **high** value and `shutdownDelayMilliseconds` to a **low** value.
85+
To configure a detached daemon lifetime, set `shutdownDelayMilliseconds` to a **high** value.
8686

8787
<tabs group="build-system">
8888
<tab title="Gradle" group-key="gradle">
8989

9090
Add the following to your `gradle.properties` file:
9191

9292
```none
93-
org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=autoshutdownIdleSeconds=7200,shutdownDelayMilliseconds=1000
93+
org.gradle.jvmargs=-Dkotlin.daemon.jvm.options=shutdownDelayMilliseconds=7200
9494
```
9595

9696
</tab>
9797
<tab title="Maven" group-key="maven">
9898

99-
Use the following command:
99+
Add the following property to your `pom.xml` file:
100100

101-
```bash
102-
mvn package -Dkotlin.daemon.options=autoshutdownIdleSeconds=7200,shutdownDelayMilliseconds=1000
101+
```xml
102+
<kotlin.compiler.daemon.shutdownDelayMs>7200</kotlin.compiler.daemon.shutdownDelayMs>
103103
```
104104

105105
</tab>
106-
</tabs>
106+
</tabs>

0 commit comments

Comments
 (0)