Skip to content
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

Update task.md #18

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Coroutines/Run the code/task.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
The program loads the contributors for all of the repositories under the given organization (named “kotlin” by default). Later you'll add logic to sort the users by the number of their contributions.
The program loads the contributors for all of the repositories under the given organization (which is named “kotlin” by default). Later, you'll add logic to sort the users according to the number of their contributions.

Open the [src/contributors/main.kt](course://Coroutines/Run the code/src/contributors/main.kt) file and run the `main()` function or just use the "Run" button below. You'll see the following window:

![First window](images/initial-window.png)

1. If the font is too small, adjust it by changing the value of `setDefaultFontSize(18f)` in the `main()` function.
2. Provide your GitHub username and token (or password) in the corresponding fields.
2. Input your GitHub username and token (or password) in the corresponding fields.
3. Make sure that the BLOCKING option is selected in the Variant dropdown menu.
4. Click Load contributors. The UI should freeze for some time and then show the list of contributors.
5. Open the program output to ensure the data has been loaded. The list of contributors is logged after each successful request.
5. Open the program output to verify that the data has been loaded. The list of contributors is logged following each successful request.

There are different ways of implementing this logic: by using [blocking requests](https://kotlinlang.org/docs/coroutines-and-channels.html#blocking-requests) or [callbacks](https://kotlinlang.org/docs/coroutines-and-channels.html#callbacks). You'll compare these solutions with one that uses [coroutines](https://kotlinlang.org/docs/coroutines-and-channels.html#coroutines) and see how [channels](https://kotlinlang.org/docs/coroutines-and-channels.html#channels) can be used to share information between different coroutines.
There are different ways of implementing this logic: by using [blocking requests](https://kotlinlang.org/docs/coroutines-and-channels.html#blocking-requests) or [callbacks](https://kotlinlang.org/docs/coroutines-and-channels.html#callbacks). You'll compare these solutions with one that uses [coroutines](https://kotlinlang.org/docs/coroutines-and-channels.html#coroutines) and see how [channels](https://kotlinlang.org/docs/coroutines-and-channels.html#channels) can be used to share information between various coroutines.



Expand Down