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

HW Flow | Nuradil #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

HW Flow | Nuradil #98

wants to merge 2 commits into from

Conversation

zhnuradil
Copy link

No description provided.

Copy link
Collaborator

@antonkazakov antonkazakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Привет. Оставил пару замечаний, которые нужно поправить

emit("Fizz")
}
else -> {
emit(it.toString())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emit(it.toString()) можо вынести за when

catsRepository.listenForCatFacts().collect {
_catsLiveData.value = it
try {
withContext(Dispatchers.IO) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь нужно собирать эвенты на Main, а эмитить на IO

}
} catch (throwable: Throwable) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Думаю здесь тоже нужно пробросить cancellationException дальше

Copy link
Author

@zhnuradil zhnuradil Feb 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чтобы не ломать механизм отмены корутин? На любых иерархии корутин бросать cancellationException дальше?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Привет!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants