Skip to content

Commit eb1b5db

Browse files
authored
Fix doc references that differ only in case (function vs interface) (#2292)
Fixes #2279
1 parent 863258b commit eb1b5db

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ suspend fun main() = coroutineScope {
2929
* [delay] and [yield] top-level suspending functions;
3030
* [Flow] — cold asynchronous stream with [flow][_flow] builder and comprehensive operator set ([filter], [map], etc);
3131
* [Channel], [Mutex], and [Semaphore] communication and synchronization primitives;
32-
* [coroutineScope], [supervisorScope], [withContext], and [withTimeout] scope builders;
32+
* [coroutineScope][_coroutineScope], [supervisorScope][_supervisorScope], [withContext], and [withTimeout] scope builders;
3333
* [MainScope()] for Android and UI applications;
3434
* [SupervisorJob()] and [CoroutineExceptionHandler] for supervision of coroutines hierarchies;
3535
* [select] expression support and more.
@@ -227,8 +227,8 @@ See [Contributing Guidelines](CONTRIBUTING.md).
227227
[Dispatchers.Default]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-dispatchers/-default.html
228228
[delay]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/delay.html
229229
[yield]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/yield.html
230-
[coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
231-
[supervisorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/supervisor-scope.html
230+
[_coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
231+
[_supervisorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/supervisor-scope.html
232232
[withContext]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/with-context.html
233233
[withTimeout]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/with-timeout.html
234234
[MainScope()]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-main-scope.html

docs/basics.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,12 @@ World!
235235
### Scope builder
236236

237237
In addition to the coroutine scope provided by different builders, it is possible to declare your own scope using the
238-
[coroutineScope] builder. It creates a coroutine scope and does not complete until all launched children complete.
238+
[coroutineScope][_coroutineScope] builder. It creates a coroutine scope and does not complete until all launched children complete.
239239

240-
[runBlocking] and [coroutineScope] may look similar because they both wait for their body and all its children to complete.
240+
[runBlocking] and [coroutineScope][_coroutineScope] may look similar because they both wait for their body and all its children to complete.
241241
The main difference is that the [runBlocking] method _blocks_ the current thread for waiting,
242-
while [coroutineScope] just suspends, releasing the underlying thread for other usages.
243-
Because of that difference, [runBlocking] is a regular function and [coroutineScope] is a suspending function.
242+
while [coroutineScope][_coroutineScope] just suspends, releasing the underlying thread for other usages.
243+
Because of that difference, [runBlocking] is a regular function and [coroutineScope][_coroutineScope] is a suspending function.
244244

245245
It can be demonstrated by the following example:
246246

@@ -281,7 +281,7 @@ Coroutine scope is over
281281
-->
282282

283283
Note that right after the "Task from coroutine scope" message (while waiting for nested launch)
284-
"Task from runBlocking" is executed and printed — even though the [coroutineScope] is not completed yet.
284+
"Task from runBlocking" is executed and printed — even though the [coroutineScope][_coroutineScope] is not completed yet.
285285

286286
### Extract function refactoring
287287

@@ -403,7 +403,7 @@ Active coroutines that were launched in [GlobalScope] do not keep the process al
403403
[runBlocking]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/run-blocking.html
404404
[Job]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/index.html
405405
[Job.join]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/join.html
406-
[coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
406+
[_coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
407407
[CoroutineScope()]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope.html
408408
<!--- END -->
409409

docs/composing-suspending-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ concurrency, as shown in the section below.
308308
Let us take the [Concurrent using async](#concurrent-using-async) example and extract a function that
309309
concurrently performs `doSomethingUsefulOne` and `doSomethingUsefulTwo` and returns the sum of their results.
310310
Because the [async] coroutine builder is defined as an extension on [CoroutineScope], we need to have it in the
311-
scope and that is what the [coroutineScope] function provides:
311+
scope and that is what the [coroutineScope][_coroutineScope] function provides:
312312

313313
<div class="sample" markdown="1" theme="idea" data-highlight-only>
314314

@@ -431,5 +431,5 @@ Computation failed with ArithmeticException
431431
[Job.start]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job/start.html
432432
[GlobalScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-global-scope/index.html
433433
[CoroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-scope/index.html
434-
[coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
434+
[_coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
435435
<!--- END -->

docs/exception-handling.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,9 @@ The second child is cancelled because the supervisor was cancelled
413413

414414
#### Supervision scope
415415

416-
Instead of [coroutineScope], we can use [supervisorScope] for _scoped_ concurrency. It propagates the cancellation
416+
Instead of [coroutineScope][_coroutineScope], we can use [supervisorScope][_supervisorScope] for _scoped_ concurrency. It propagates the cancellation
417417
in one direction only and cancels all its children only if it failed itself. It also waits for all children before completion
418-
just like [coroutineScope] does.
418+
just like [coroutineScope][_coroutineScope] does.
419419

420420
<div class="sample" markdown="1" theme="idea" data-highlight-only>
421421

@@ -464,7 +464,7 @@ Caught an assertion error
464464
Another crucial difference between regular and supervisor jobs is exception handling.
465465
Every child should handle its exceptions by itself via the exception handling mechanism.
466466
This difference comes from the fact that child's failure does not propagate to the parent.
467-
It means that coroutines launched directly inside the [supervisorScope] _do_ use the [CoroutineExceptionHandler]
467+
It means that coroutines launched directly inside the [supervisorScope][_supervisorScope] _do_ use the [CoroutineExceptionHandler]
468468
that is installed in their scope in the same way as root coroutines do
469469
(see the [CoroutineExceptionHandler](#coroutineexceptionhandler) section for details).
470470

@@ -517,8 +517,8 @@ The scope is completed
517517
[runBlocking]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/run-blocking.html
518518
[SupervisorJob()]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-supervisor-job.html
519519
[Job()]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-job.html
520-
[coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
521-
[supervisorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/supervisor-scope.html
520+
[_coroutineScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/coroutine-scope.html
521+
[_supervisorScope]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/supervisor-scope.html
522522
<!--- INDEX kotlinx.coroutines.channels -->
523523
[actor]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/actor.html
524524
[produce]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/produce.html

docs/flow.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ I'm not blocked 3
203203

204204
Notice the following differences in the code with the [Flow] from the earlier examples:
205205

206-
* A builder function for [Flow] type is called [flow].
206+
* A builder function for [Flow] type is called [flow][_flow].
207207
* Code inside the `flow { ... }` builder block can suspend.
208208
* The `simple` function is no longer marked with `suspend` modifier.
209209
* Values are _emitted_ from the flow using [emit][FlowCollector.emit] function.
@@ -214,7 +214,7 @@ thread is blocked in this case.
214214

215215
### Flows are cold
216216

217-
Flows are _cold_ streams similar to sequences &mdash; the code inside a [flow] builder does not
217+
Flows are _cold_ streams similar to sequences &mdash; the code inside a [flow][_flow] builder does not
218218
run until the flow is collected. This becomes clear in the following example:
219219

220220
<div class="sample" markdown="1" theme="idea" data-min-compiler-version="1.3">
@@ -1785,7 +1785,7 @@ coroutine only without cancelling the whole scope or to [join][Job.join] it.
17851785

17861786
### Flow cancellation checks
17871787

1788-
For convenience, the [flow] builder performs additional [ensureActive] checks for cancellation on each emitted value.
1788+
For convenience, the [flow][_flow] builder performs additional [ensureActive] checks for cancellation on each emitted value.
17891789
It means that a busy loop emitting from a `flow { ... }` is cancellable:
17901790

17911791
<div class="sample" markdown="1" theme="idea" data-min-compiler-version="1.3">
@@ -1944,7 +1944,7 @@ Integration modules include conversions from and to `Flow`, integration with Rea
19441944
[CancellationException]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-cancellation-exception/index.html
19451945
<!--- INDEX kotlinx.coroutines.flow -->
19461946
[Flow]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow/index.html
1947-
[flow]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow.html
1947+
[_flow]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow.html
19481948
[FlowCollector.emit]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/-flow-collector/emit.html
19491949
[collect]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/collect.html
19501950
[flowOf]: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flow-of.html

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kotlin_version=1.4.0
1010
# Dependencies
1111
junit_version=4.12
1212
atomicfu_version=0.14.4
13-
knit_version=0.2.0
13+
knit_version=0.2.2
1414
html_version=0.6.8
1515
lincheck_version=2.7.1
1616
dokka_version=0.9.16-rdev-2-mpp-hacks

0 commit comments

Comments
 (0)