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
  • Concurrency vs parallelism: what the Go runtime does

    Go SELF
    65 level,0 lecture
    We break down how concurrency differs from parallelism in Go, what role the runtime and the goroutine scheduler play, what the G/ M/ P model means, how the GOMAXPROCS parameter affects potential parallelism, why execution order is nondeterministic, why finishing main ends the entire process, and why time.Sleep is a demonstration, not synchronization.
    Open
  • Goroutine — running go f() and the lifecycle

    Go SELF
    65 level,1 lecture
    We break down the basic concurrency model in Go: how the go statement works (it applies only to a function call), why finishing main instantly ends the whole process together with background goroutines, when arguments are evaluated (value vs pointer), why you cannot “return a result” from a goroutine with a regular return, and how panic inside a goroutine affects the program and how a local recover helps. At the end: typical thinking mistakes and a practical mini-example.
    Open
  • sync.WaitGroup: Add, Done, Wait and common mistakes

    Go SELF
    65 level,2 lecture
    We break down why goroutine by themselves do not “keep” the program alive, and how to correctly wait for them to finish using sync.WaitGroup. We lock in the contract: wg.Add(...) — before launching via go, wg.Done() — inside the goroutine (preferably via defer), wg.Wait() — at the waiting point. Plus patterns (one task, a batch of tasks in a loop, passing WaitGroup by pointer) and typical mistakes: Add “in the wrong place”, a forgotten Done, a negative counter, and accidental copying of the struct.
    Open
  • Data race — what it is and why “it sometimes works” is a bad sign

    Go SELF
    65 level,3 lecture
    We break down what data race means in Go: why concurrent code may “sometimes work” and still be incorrect, how races happen with counter ++, why WaitGroup does not make data safe, why concurrent append to a shared slice and writes to a map are dangerous, and how to avoid races without Mutex, atomic, or channels — by splitting ownership and reading results only after wg . Wait ().
    Open
  • Closures and loop variables in Go: range pitfalls after Go 1.22+

    Go SELF
    65 level,4 lecture
    We break down what exactly a closure “captures” in Go (a variable, not a value), why the loop + goroutine combination was historically dangerous, what changed in Go 1.22+ for the typical for/range case, and why the style with explicit parameter passing into go func remains the most readable and reliable. We also discuss the semantics of range (copying the element) and common mistakes that lead to a data race.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
  • Game projects
Community
  • Users
  • Articles
  • Forum
  • Chat
  • 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