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
  • CoroutineScope and Job — task hierarchy and lifecycle management

    Kotlin SELF
    53 level,0 lecture
    We unpack structured concurrency in Kotlin coroutines: why coroutines need an “owner” in the form of CoroutineScope, how runBlocking and coroutineScope create operation boundaries and automatically wait for child tasks, what exactly launch returns (a Job), and how to explicitly control wait points via join(). We reinforce the “parent → children” hierarchy idea and assemble a small report from parallel steps in an Expense Tracker example.
    Open
  • withContext and dispatcher in a coroutine: switching the execution context

    Kotlin SELF
    53 level,1 lecture
    We break down how, inside a single coroutine, you can locally switch the execution context using withContext: what CoroutineContext and CoroutineDispatcher are, how Dispatchers. Default (CPU) and Dispatchers. IO (I/O) differ, why withContext is suspend, and why it does not provide parallelism. Using a mini-app (“cash register”) and thread logging as an example, we show switching, practical patterns, and common mistakes.
    Open
  • Coroutine cancellation: cancel/join, cooperation, and isActive

    Kotlin SELF
    53 level,2 lecture
    Let’s break down how cancellation works in kotlinx.coroutines: what the differences are between cancel(), join(), and cancelAndJoin(), why coroutine cancellation is cooperative, where the “suspension points” (for example, delay()) are, and how to write your own loops so they respect cancellation via isActive. At the end, we’ll walk through a practical scenario with a “long report” and review common mistakes.
    Open
  • Exceptions in coroutines: launch/async differences

    Kotlin SELF
    53 level,3 lecture
    Let’s break down how exceptions behave in Kotlin coroutines and why error handling differs for launch and async: where try/ catch actually triggers, why an exception from async usually surfaces at await(), how errors “bubble up” at the coroutineScope/ runBlocking boundary, and which common pitfalls (forgotten await(), wrong builder choice, “swallowing” errors) most often break scenarios.
    Open
  • Cleanup on cancellation and errors — try/finally as a completion guarantee

    Kotlin SELF
    53 level,4 lecture
    We break down why cleanup in coroutines is part of the contract: a coroutine may finish early due to cancel(), an exception, or an early return. We learn how to guarantee “cleanup” via try/ finally, correctly wait for completion with cancelAndJoin(), distribute responsibility by levels (parent/children), and avoid turning finally into a source of new errors.
    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