Manus에서 모든 스킬 실행
원클릭으로
원클릭으로
원클릭으로 Manus에서 모든 스킬 실행
시작하기kotlin-coroutines
Kotlin coroutines - structured concurrency, Flows, exception handling
스타7
포크1
업데이트2025년 12월 30일 12:44
파일 탐색기
6 개 파일SKILL.md
readonly메뉴
Kotlin coroutines - structured concurrency, Flows, exception handling
Modern Android development - Jetpack, Compose, Architecture Components
Jetpack Compose - composables, state, effects, theming
Dependency Injection - Hilt, Koin, scopes, testing
Kotlin DSL - type-safe builders, Gradle DSL, @DslMarker
Kotlin Flow - StateFlow, SharedFlow, operators, testing
Ktor framework - routing, authentication, WebSockets
| name | kotlin-coroutines |
| description | Kotlin coroutines - structured concurrency, Flows, exception handling |
| version | 1.0.0 |
| sasmp_version | 1.3.0 |
| bonded_agent | 03-kotlin-coroutines |
| bond_type | PRIMARY_BOND |
| execution | {"timeout_ms":30000,"retry":{"max_attempts":3,"backoff":"exponential","initial_delay_ms":1000}} |
| parameters | {"required":[{"name":"pattern","type":"string","validation":"^(basic|structured|exception|testing)$"}],"optional":[{"name":"dispatcher","type":"string","default":"Default"}]} |
| logging | {"level":"info","events":["skill_invoked","pattern_loaded","error_occurred"]} |
Master asynchronous programming with structured concurrency.
// ✅ Structured - cancellation propagates
class Repository(private val scope: CoroutineScope) {
suspend fun load() = withContext(Dispatchers.IO) { fetch() }
}
// ❌ Avoid GlobalScope
GlobalScope.launch { /* leaks */ }
suspend fun loadData() = supervisorScope {
val a = async { fetchA() }
val b = async { fetchB() }
Result(a.awaitOrNull(), b.awaitOrNull())
}
// Never swallow CancellationException
catch (e: Exception) {
if (e is CancellationException) throw e
}
@Test
fun test() = runTest {
val vm = ViewModel(testDispatcher)
vm.load()
advanceUntilIdle()
assertThat(vm.state.value.data).isNotNull()
}
| Issue | Resolution |
|---|---|
| Coroutine leak | Use structured scopes, not GlobalScope |
| Test hangs | Inject TestDispatcher, use advanceUntilIdle() |
Skill("kotlin-coroutines")