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

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Structured Concurrency

    JAVA 25 SELF
    58 level,0 lecture
    Structured Concurrency turns a chaotic set of threads into a managed hierarchy of tasks: you launch subtasks in virtual threads within StructuredTaskScope, wait for them via join(), handle errors centrally with throwIfFailed(), and get results with resultNow()/ result(). We’ll examine the termination policies ShutdownOnFailure and ShutdownOnSuccess, compare them with CompletableFuture, look at HTTP aggregator examples, and cover common mistakes when using structured concurrency.
    Open
  • Canceling tasks and timeouts across the stack

    JAVA 25 SELF
    58 level,1 lecture
    How to correctly cancel long-running and blocking operations in Java: cooperative interruption via Thread.interrupt(), canceling tasks via Future.cancel() and the behavior of CancellationException, timeouts and cancellation in CompletableFuture ( orTimeout, completeOnTimeout), structured concurrency with StructuredTaskScope, a shared deadline (time budget) and propagating timeouts down the stack (including Instant/ Duration and Scoped Values). We cover practice with blocking I/O and common mistakes.
    Open
  • High-level synchronizers

    JAVA 25 SELF
    58 level,2 lecture
    In this lecture we cover high-level synchronizers from java.util.concurrent: CountDownLatch, CyclicBarrier, Phaser, and Exchanger. We learn to coordinate task start and completion via await()/ countDown(), build reusable phases and barrier actions with await(), manage dynamic members of the “orchestra” with register()/ arriveAndAwaitAdvance()/ arriveAndDeregister(), and exchange data in pairs via exchange(). In practice we implement a mass start of workers and a “game tick,” and also examine common mistakes: the one-shot nature of CountDownLatch, handling BrokenBarrierException, and proper deregister(). Everywhere we avoid the pain of wait()/ notify().
    Open
  • StampedLock and low-contention counters

    JAVA 25 SELF
    58 level,3 lecture
    When ReentrantReadWriteLock and the classic ReadWriteLock start to struggle under high load, StampedLock with optimistic reads comes to the rescue: the pair tryOptimisticRead + validate provides almost “free” reads when writes are rare. We’ll break down lock modes, working with stamps, reentrancy limitations, compare it with ReentrantReadWriteLock, and also look at low-contention counters — LongAdder and LongAccumulator — and why they outperform AtomicLong under contention. We’ll finish with hands-on practice: a read-dominant cache and a mini-benchmark.
    Open
  • Java Memory Model (JMM)

    JAVA 25 SELF
    58 level,4 lecture
    We break down the rules of visibility and operation ordering in the Java Memory Model: what the happens-before relation means, how and when volatile, synchronized, and final fields ( final) help, and why “stale” data appears without them. We will show safe publication of objects, correct double-checked locking, low-level access via VarHandle, the impact of false sharing and the @Contended annotation, as well as practical notes about Thread.start()/ Thread.join(), Future.get(), and JMH microbenchmarks.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy