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
  • Channels: `chan T`, `make(chan T)`, send/receive

    Go SELF
    66 level,0 lecture
    We break down channels in Go as the basic communication mechanism for goroutines: the type chan T, creation via make( chan T), and the dangers of a nil channel. We learn two operations — sending ch <- v and receiving <- ch — understand the “handshake” of an unbuffered channel, the reasons for deadlock, and common mistakes when designing a send/receive protocol.
    Open
  • Buffered vs unbuffered channels — behavior differences

    Go SELF
    66 level,1 lecture
    We break down the behavior of channels in Go: what makes an unbuffered channel different (a strict “handshake” and synchronization) from a buffered one (a queue and a shifted blocking point), when send/ receive operations block, how to interpret len/ cap, why “buffer size 1” is sometimes needed to keep a goroutine from getting stuck, and which common mistakes lead to unexpected blocking.
    Open
  • Closing a channel: close, reading v, ok := <-ch

    Go SELF
    66 level,2 lecture
    Let’s break down how to properly finish a data stream in Go by closing a channel: what exactly close( ch) does (and does not do), who should close the channel, how reads behave after closing, and how to distinguish “real data” from “end of stream” using the form v , ok := <- ch. Plus: scenarios with multiple senders (a coordinator + WaitGroup) and a list of common mistakes that lead to panic.
    Open
  • for range ch — the “producer closes the channel” pattern

    Go SELF
    66 level,3 lecture
    We break down why reading a channel with for range means reading “until the stream ends”, how this is equivalent to the v , ok := <- ch idiom, and why you need the protocol “one producer sends and that same producer does close ( ch )”. We will also show why an unclosed channel leads to a “silent hang”, and how to embed the data-streaming pattern into application code.
    Open
  • Channel direction in the API — chan<- and <-chan

    Go SELF
    66 level,4 lecture
    We break down why in Go you may want to “narrow permissions” on channels in a public API: how to use chan <- T (send-only) and <- chan T (receive-only), why direction is part of the type, who should call close, and how to design stream-style functions that return only a read-only channel.
    Open
Learn
  • Registration
  • Java course
  • Help with tasks
  • Pricing
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