android / android/architecture-samples

[Question] coroutine question in TasksViewModel

Open
#738 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
45.8k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Description

Line 201 in the TasksViewModel,

viewModelScope.launch {
result.value = filterItems(tasksResult.data, getSavedFilterType())
}

Why google use coroutine???
what are the advantages or reasons??

Contributor guide

Open the contributing guide

Research direction

Start at line 201 of TasksViewModel and read the surrounding viewModelScope.launch block, including filterItems and getSavedFilterType. The issue is done when the coroutine's purpose and relevant advantages or reasons are explained clearly in the issue thread or project documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.