Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Update 03_UsingCallbacks.md: Fix a typo and add missing argument to function #155

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions Introduction to Coroutines and Channels/03_UsingCallbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Now that all the loading has been moved to a separate thread, the main thread is

![](./assets/3-callbacks/Background.png)

The signature of the `loadContributors` function changes, it takes a `updateResults` callback as a last argument
The signature of the `loadContributorsBackground` function changes, it takes a `updateResults` callback as a last argument
to call it after all the loading completes:

```kotlin
Expand All @@ -34,7 +34,7 @@ fun loadContributorsBackground(service: GitHubService, req: RequestData,
Now when the `loadContributorsBackground` is called, the `updateResults` call goes in the callback, not immediately afterwards as it did before:

```kotlin
loadContributorsBackground(req) { users ->
loadContributorsBackground(service, req) { users ->
SwingUtilities.invokeLater {
updateResults(users, startTime)
}
Expand Down