JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Success stories
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Getting to know coroutines

    Kotlin SELF
    52 level,0 lecture
    We break down the basic motivation for coroutines in Kotlin: how blocking a thread with Thread.sleep differs from suspending a coroutine with delay, what the keyword suspend means (a contract, not a “speed booster”), why you need the kotlinx.coroutines library and the runBlocking “bridge”, and what mistakes beginners most often make when first getting acquainted with asynchrony.
    Open
  • runBlocking in a console main: correct coroutine startup

    Kotlin SELF
    52 level,1 lecture
    We’ll break down why you can’t call suspend functions directly from a regular main, how runBlocking works as a “bridge” into the coroutine world, and why it honestly blocks the thread. We add the kotlinx.coroutines dependency, build the right style: a single runBlocking at the entry point and a chain of suspend scenarios (for example, runApp), plus a practical example of loading data and producing a report.
    Open
  • suspend and delay vs Thread.sleep — how to “wait correctly”

    Kotlin SELF
    52 level,2 lecture
    We break down how “waiting” differs in coroutines versus threads: why suspend is needed as an honest function contract, how delay works (it suspends a coroutine without blocking a thread), and why Thread . sleep freezes a real thread. We reinforce the difference with a table, a practical pattern (“waiting inside a suspend function”), and a list of common mistakes.
    Open
  • launch and async/await — coroutines “for actions” and “for results”

    Kotlin SELF
    52 level,3 lecture
    We break down two core coroutine builders from kotlinx.coroutines: launch (a coroutine for an action/side effect) and async (a coroutine for a result). We will understand what Deferred<T> is, why await() is needed, how not to “break” concurrency with early awaits, where it makes sense to mix launch and async, and which mistakes beginners make most often.
    Open
  • Dispatchers and common mistakes: GlobalScope, await(), blocking

    Kotlin SELF
    52 level,4 lecture
    We break down how to choose the right Dispatcher for a coroutine: Dispatchers.Default for CPU computations and Dispatchers.IO for blocking input/output. We also cover frequent issues separately: using GlobalScope in console applications, forgetting await() on Deferred<T>, and blocking via Thread . sleep ( ... ) instead of the correct delay ( ... ). At the end, there is a mini-scenario with parallel reports and a decision scheme for “where to run”.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success stories
  • Activities
Company
  • About us
  • Contacts
  • Reviews
  • FAQ
  • Support
JavaRushJavaRush — is an interactive online course for learning Java programming from scratch. It contains 1200 practical tasks with one-click solution checking, the necessary minimum of theory on Java basics, and motivating features that help you complete the course: games, quizzes, interesting projects and articles on effective learning and the career of a Java developer.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush
MastercardVisa
"Programmers are not born" © 2026 JavaRush