Skip to content

Commit fb0919f

Browse files
committed
Alexander review
1 parent 46ff90b commit fb0919f

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

docs/topics/kotlin-daemon.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ There are ways to configure some settings for the Kotlin daemon for Gradle or Ma
1818

1919
### Memory management
2020

21+
The Kotlin daemon is a separate process that has its own memory space, isolated from the client.
2122
By default, the Kotlin daemon tries to inherit the heap size (`-Xmx`) of the launching JVM process.
2223

2324
To configure specific memory limits, like `-Xmx` and `-XX:MaxMetaspaceSize`, use the following property:
@@ -45,20 +46,20 @@ For more information, see [`kotlin.daemon.jvmargs` property](gradle-compilation-
4546

4647
There are two common lifetime strategies for the Kotlin daemon:
4748

48-
* **Short-lived daemon**: Used when the client (like a build system) is long-running. The daemon shuts down shortly after the
49-
last compilation.
50-
* **Long-lived daemon**: Used when the client is short-lived (like command-line compilation). The daemon stays alive longer
49+
* **Detached daemon**: Used when the client (like a build system) is long-running. The daemon shuts down shortly after the
50+
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
5152
to await potential follow-up requests.
5253

5354
To configure the lifetime strategy, you can use the following options:
5455

55-
| Option | Description | Default value |
56-
|--------|----------------------------------------------------------------------------------------------------|---------------|
57-
| `autoshutdownIdleSeconds` | How long the daemon should stay alive after the last compilation when a client is still connected. | 2 hours |
58-
| `autoshutdownUnusedSeconds` | How long the daemon waits to shut down after all clients disconnect. | 1 minute |
59-
| `shutdownDelayMilliseconds` | How long a newly started daemon waits for a first client before shutting down if unused. | 1 second |
56+
| Option | Description | Default value |
57+
|-----------------------------|----------------------------------------------------------------------------------------------------|---------------|
58+
| `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 |
6061

61-
To configure a short-lived daemon lifetime, set `shutdownDelayMilliseconds` to a **high** value.
62+
To configure a detached daemon lifetime, set `shutdownDelayMilliseconds` to a **high** value.
6263

6364
<tabs group="build-system">
6465
<tab title="Gradle" group-key="gradle">
@@ -81,7 +82,7 @@ Add the following property to your `pom.xml` file:
8182
</tab>
8283
</tabs>
8384

84-
To configure a long-lived daemon lifetime, set `autoshutdownIdleSeconds` to a **high** value and `shutdownDelayMilliseconds` to a **low** value.
85+
To configure an attached daemon lifetime, set `autoshutdownIdleSeconds` to a **high** value and `shutdownDelayMilliseconds` to a **low** value.
8586

8687
<tabs group="build-system">
8788
<tab title="Gradle" group-key="gradle">

0 commit comments

Comments
 (0)