-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor Improvements to the documentation and code comments #4346
base: master
Are you sure you want to change the base?
Conversation
Refined the wording for better readability and correctness. Added missing articles and restructured sentences to avoid splitting the infinitive.
Corrected verb forms for grammatical accuracy.
Added missing commas for grammatical correctness. Ensured proper separation between clauses to enhance sentence flow.
…oaches Refined the explanation of cancellable computation strategies for greater clarity and precision. - Expanded details on periodically invoking suspending functions. - Reworded sentence structure to improve readability. - Included explicit references to `ensureActive` to provide better guidance on checking cancellation status.
…ion for quick reference.
Revised grammatical inconsistencies for improved clarity and correctness. - Changed `well-behaving` to `well-behaved` to use the correct past participle form in a compound adjective. - Remove an unnecessary "a" from "any kind of a communication channel" to ensure proper usage.
…yling Applied a note style to improve visibility and ensure that important information stands out more clearly in the documentation.
…raction with coroutineScope example - Improve readability of async and coroutineScope explanation - Simplify language while maintaining technical accuracy - Restructure sentence flow for better comprehension
…ext switching Refined the explanation of coroutine context switching for better clarity and comprehension. - Expanded details on `runBlocking` with an explicit context to highlight its controlled execution benefits. - Clarified how `withContext` suspends a coroutine and switches execution context while ensuring smooth reversion. - Structured the explanation for improved readability and understanding.
Refined the documentation to enhance clarity and structure. - Improved sentence flow and paragraph formatting for better readability. - Reformatted explanations of job states and transitions for improved comprehension. - Enhanced descriptions of cancellation behavior to clarify distinctions between normal cancellation and failure.
Refined the documentation for `completeExceptionally` to enhance clarity and correctness. - Improved sentence structure for better readability. - Clarified the transition states of a job when completed exceptionally. - Fixed grammatical inconsistencies, such as "its responsibility" → "It is the responsibility." - Enhanced explanation of how children receive `CancellationException` for diagnostic purposes.
- Refined the explanation of `CoroutineScope` and its role in managing coroutine lifecycles. - Adjusted phrasing to provide a smoother flow and better comprehension.
…inconsistencies and enhanced the flow
…o the appropriate method
…ope() Added missing articles for improved grammatical accuracy and readability. Included a direct link to the `CoroutineScope()` function to enhance navigation and accessibility for developers.
…ng for better clarity
Expanded the explanation of `withContext` to provide a more precise understanding of its behavior. - Clarified that `withContext` only suspends and switches context if the specified context differs from the current one. - Explained how `CoroutineDispatcher` influences context switching, requiring additional dispatches. - Improved wording for better readability and comprehension.
…g coroutine execution Revised phrasing to reflect that coroutines are continuously launched throughout the application's lifecycle. - Changed "we launched" to "launching" to better align with present continuous tense, emphasizing ongoing behavior.
…s get cancelled Added "All" to stress that every coroutine is cancelled, highlighting this crucial aspect of coroutine behavior.
Corrected "a different threads" to "different threads" for grammatical accuracy.
Restored emphasis on "whole application lifetime" to clearly indicate that top-level coroutines span from application start to termination.
…tions Reverted "or" to its original placement to correctly reflect that a job remains active until either the coroutine completes or `CompletableJob.complete` is called.
…uracy Fixed an extra "on" left over after the change to ensure proper sentence structure and readability.
…prove clarity Revised the explanation of `runBlocking` to remove the ambiguous phrase "controlled environment" and improve clarity. - Reworded the first technique to focus on specifying a context explicitly. - Refined the explanation of `withContext` to emphasize its behavior when switching contexts.
… since it cannot be identified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building the project fails now because of broken links in the documentation. You can run gradle knitCheck
to confirm this.
@dkhalanskyjb All these issues are related to Kotlin Standard library functions, Isn't the Kotlin Standard library implicitly included in all Kotlin projects? Shouldn't Knit be able to find the references? |
This pull request improves the documentation and code comments in the repository.
The changes include:
cancellation-and-timeouts.md
document.composing-suspending-functions.md
.coroutine-context-and-dispatchers.md
.CompletableJob.kt
,CoroutineScope.kt
,Job.kt
,Supervisor.kt
,Yield.kt
, andThreadContextElement.kt.