Skip to content

Commit

Permalink
Update task.md
Browse files Browse the repository at this point in the history
language checked
  • Loading branch information
stephen-hero authored and kochaika committed Dec 12, 2023
1 parent 8b56a4b commit dc5f7f9
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit dc5f7f9

Please sign in to comment.