Tag

suspend

1 views collected around this technical thread.

Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 20, 2024 · Mobile Development

Understanding Kotlin Coroutines: Fundamentals, Suspension, and Resumption

This article explains the core concepts of Kotlin coroutines, including what they are, how they differ from threads, the mechanics of suspension and resumption, the role of the suspend keyword, and practical code examples that illustrate their usage in Android development.

AsyncConcurrencyKotlin
0 likes · 20 min read
Understanding Kotlin Coroutines: Fundamentals, Suspension, and Resumption
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Dec 23, 2022 · Mobile Development

Android Power Management: Power States, WakeLock, and Suspend/Resume Mechanisms

The article explains Android’s power management architecture, detailing kernel power states, CPU and device idle modes, the multi‑layer framework, WakeLock types and flags, and the early‑suspend/late‑resume mechanisms, while providing commands and examples for monitoring and controlling device sleep behavior.

AndroidDoze modeIdle State
0 likes · 11 min read
Android Power Management: Power States, WakeLock, and Suspend/Resume Mechanisms
Sohu Tech Products
Sohu Tech Products
Jan 5, 2022 · Fundamentals

Source Code Analysis – Suspension and Resumption of Kotlin Coroutines

This article dissects the Kotlin coroutine implementation by decompiling a simple coroutine, explaining how the compiler transforms suspend functions into state‑machine classes, how launch creates an AbstractCoroutine, how the dispatcher intercepts and schedules execution, and how the coroutine is suspended and later resumed through Continuation mechanisms.

ConcurrencyKotlincoroutines
0 likes · 16 min read
Source Code Analysis – Suspension and Resumption of Kotlin Coroutines
Top Architect
Top Architect
Aug 11, 2021 · Fundamentals

Why Thread.stop and Thread.suspend Are Deprecated and How to Gracefully Stop Threads in Java

This article explains why the Thread.stop and Thread.suspend methods were deprecated in modern Java, demonstrates the problems they cause with concrete code examples, and presents two safe alternatives—using a shared flag and the interrupt mechanism—to gracefully terminate threads without risking deadlocks or resource leaks.

ConcurrencyInterruptJava
0 likes · 10 min read
Why Thread.stop and Thread.suspend Are Deprecated and How to Gracefully Stop Threads in Java
Sohu Tech Products
Sohu Tech Products
Jun 30, 2021 · Mobile Development

Understanding Kotlin Coroutine Suspension and Resume Mechanism on Android

This article explains how Kotlin coroutines simplify asynchronous programming on Android by using suspension, detailing core concepts, APIs, dispatchers, suspend functions, and the underlying implementation through decompiled bytecode and continuation‑passing style, complemented by practical code examples and execution logs.

AndroidConcurrencyKotlin
0 likes · 34 min read
Understanding Kotlin Coroutine Suspension and Resume Mechanism on Android
OPPO Kernel Craftsman
OPPO Kernel Craftsman
Sep 27, 2020 · Mobile Development

Understanding the Android Kernel Suspend Process and Power Management

The Android kernel suspend process begins when user‑space writes “mem” to /sys/power/state, triggering an autosuspend loop that validates wakeup_count, logs pending wakeups, freezes filesystems and threads, sequentially calls device suspend callbacks, prepares platform‑specific operations, disables CPUs and interrupts, saves core state, and finally enters the low‑power s2ram state.

AndroidKernelWakeup Count
0 likes · 11 min read
Understanding the Android Kernel Suspend Process and Power Management
Jike Tech Team
Jike Tech Team
Oct 17, 2019 · Mobile Development

Understanding Kotlin Coroutine Suspension: launch, async, and suspend Explained

This article explains how Kotlin coroutines work in Android, comparing launch and async, detailing the role of suspend functions, thread switching with Dispatchers, and how the coroutine framework handles suspension and resumption to simplify asynchronous programming.

AndroidAsyncConcurrency
0 likes · 13 min read
Understanding Kotlin Coroutine Suspension: launch, async, and suspend Explained