Skip to content

Commit 6da0ccd

Browse files
Inegoelizarov
authored andcommitted
Change "create new" to "create a"
1 parent 596187e commit 6da0ccd

12 files changed

+14
-14
lines changed

RELEASE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To release new `<version>` of `kotlinx-coroutines`:
5050
* Run "Deploy (Configure, RUN THIS ONE)" configuration with the corresponding new version.
5151

5252
2. In [GitHub](https://github.com/kotlin/kotlinx.coroutines) interface:
53-
* Create new release named as `<version>`.
53+
* Create a release named `<version>`.
5454
* Cut & paste lines from [`CHANGES.md`](CHANGES.md) into description.
5555

5656
3. Build and publish documentation for web-site: <br>

docs/basics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ World!
250250

251251
### Scope builder
252252
In addition to the coroutine scope provided by different builders, it is possible to declare your own scope using
253-
[coroutineScope] builder. It creates new coroutine scope and does not complete until all launched children
253+
[coroutineScope] builder. It creates a coroutine scope and does not complete until all launched children
254254
complete. The main difference between [runBlocking] and [coroutineScope] is that the latter does not block the current thread
255255
while waiting for all children to complete.
256256

docs/exception-handling.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ while the latter are relying on the user to consume the final
4848
exception, for example via [await][Deferred.await] or [receive][ReceiveChannel.receive]
4949
([produce] and [receive][ReceiveChannel.receive] are covered later in [Channels](https://github.com/Kotlin/kotlinx.coroutines/blob/master/docs/channels.md) section).
5050

51-
It can be demonstrated by a simple example that creates new coroutines in [GlobalScope]:
51+
It can be demonstrated by a simple example that creates coroutines in the [GlobalScope]:
5252

5353
<div class="sample" markdown="1" theme="idea" data-highlight-only>
5454

kotlinx-coroutines-core/common/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Coroutine dispatchers implementing [CoroutineDispatcher]:
1818
| --------------------------- | ---------------
1919
| [Dispatchers.Default] | Confines coroutine execution to a shared pool of background threads
2020
| [Dispatchers.Unconfined] | Does not confine coroutine execution in any way
21-
| [newSingleThreadContext] | Create new single-threaded coroutine context
22-
| [newFixedThreadPoolContext] | Creates new thread pool of a fixed size
21+
| [newSingleThreadContext] | Creates a single-threaded coroutine context
22+
| [newFixedThreadPoolContext] | Creates a thread pool of a fixed size
2323
| [Executor.asCoroutineDispatcher][java.util.concurrent.Executor.asCoroutineDispatcher] | Extension to convert any executor
2424

2525
More context elements:

kotlinx-coroutines-core/common/src/Builders.common.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public fun CoroutineScope.launch(
5858
// --------------- async ---------------
5959

6060
/**
61-
* Creates new coroutine and returns its future result as an implementation of [Deferred].
61+
* Creates a coroutine and returns its future result as an implementation of [Deferred].
6262
* The running coroutine is cancelled when the resulting deferred is [cancelled][Job.cancel].
6363
*
6464
* Coroutine context is inherited from a [CoroutineScope], additional context elements can be specified with [context] argument.

kotlinx-coroutines-core/common/src/CoroutineExceptionHandler.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ internal fun handlerException(originalException: Throwable, thrownException: Thr
4141
}
4242

4343
/**
44-
* Creates new [CoroutineExceptionHandler] instance.
44+
* Creates a [CoroutineExceptionHandler] instance.
4545
* @param handler a function which handles exception thrown by a coroutine
4646
*/
4747
@Suppress("FunctionName")

kotlinx-coroutines-core/common/src/Supervisor.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public fun SupervisorJob(parent: Job? = null) : CompletableJob = SupervisorJobIm
3838
public fun SupervisorJob0(parent: Job? = null) : Job = SupervisorJob(parent)
3939

4040
/**
41-
* Creates new [CoroutineScope] with [SupervisorJob] and calls the specified suspend block with this scope.
41+
* Creates a [CoroutineScope] with [SupervisorJob] and calls the specified suspend block with this scope.
4242
* The provided scope inherits its [coroutineContext][CoroutineScope.coroutineContext] from the outer scope, but overrides
4343
* context's [Job] with [SupervisorJob].
4444
*

kotlinx-coroutines-core/common/src/sync/Mutex.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public interface Mutex {
8888
}
8989

9090
/**
91-
* Creates new [Mutex] instance.
91+
* Creates a [Mutex] instance.
9292
* The mutex created is fair: lock is granted in first come, first served order.
9393
*
9494
* @param locked initial state of the mutex.

kotlinx-coroutines-core/jvm/src/ThreadPoolDispatcher.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fun newSingleThreadContext(name: String): ExecutorCoroutineDispatcher =
3131
newFixedThreadPoolContext(1, name)
3232

3333
/**
34-
* Creates new coroutine execution context with the fixed-size thread-pool and built-in [yield] support.
34+
* Creates a coroutine execution context with the fixed-size thread-pool and built-in [yield] support.
3535
* **NOTE: The resulting [ExecutorCoroutineDispatcher] owns native resources (its threads).
3636
* Resources are reclaimed by [ExecutorCoroutineDispatcher.close].**
3737
*

kotlinx-coroutines-core/jvm/src/internal/StackTraceRecovery.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private fun <E : Throwable> recoverFromStackFrame(exception: E, continuation: Co
5050
*/
5151
val (cause, recoveredStacktrace) = exception.causeAndStacktrace()
5252

53-
// Try to create new exception of the same type and get stacktrace from continuation
53+
// Try to create an exception of the same type and get stacktrace from continuation
5454
val newException = tryCopyException(cause) ?: return exception
5555
val stacktrace = createStackTrace(continuation)
5656
if (stacktrace.isEmpty()) return exception

kotlinx-coroutines-core/jvm/src/scheduling/Dispatcher.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ open class ExperimentalCoroutineDispatcher(
7777
}
7878

7979
/**
80-
* Creates new coroutine execution context with limited parallelism to execute tasks which may potentially block.
80+
* Creates a coroutine execution context with limited parallelism to execute tasks which may potentially block.
8181
* Resulting [CoroutineDispatcher] doesn't own any resources (its threads) and provides a view of the original [ExperimentalCoroutineDispatcher],
8282
* giving it additional hints to adjust its behaviour.
8383
*
@@ -89,7 +89,7 @@ open class ExperimentalCoroutineDispatcher(
8989
}
9090

9191
/**
92-
* Creates new coroutine execution context with limited parallelism to execute CPU-intensive tasks.
92+
* Creates a coroutine execution context with limited parallelism to execute CPU-intensive tasks.
9393
* Resulting [CoroutineDispatcher] doesn't own any resources (its threads) and provides a view of the original [ExperimentalCoroutineDispatcher],
9494
* giving it additional hints to adjust its behaviour.
9595
*

kotlinx-coroutines-core/jvm/test/scheduling/BlockingCoroutineDispatcherStressTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class BlockingCoroutineDispatcherStressTest : SchedulerTestBase() {
5050
val iterations = 1000 * stressTestMultiplier
5151

5252
repeat(iterations) {
53-
// Create new dispatcher every iteration to increase probability of race
53+
// Create a dispatcher every iteration to increase probability of race
5454
val dispatcher = ExperimentalCoroutineDispatcher(CORES_COUNT)
5555
val blockingDispatcher = dispatcher.blocking(100)
5656

0 commit comments

Comments
 (0)