Tagged articles
channel
74 articles · Page 1 of 1
Go 1.27 introduces a goroutine leak profiler that uses a modified garbage collector to identify permanently blocked goroutines on channels and sync primitives in running programs, including production, with minimal overhead and near-zero false positives, demonstrated through real-world examples from CockroachDB, etcd, Kubernetes, and Moby.
Go 1.27channelconcurrency debugging
0 likes · 29 min read


TonyBaiOct 5, 2026 · Backend Development
The article traces the 10-year history of Go issue #16620, which sought to make sync.Cond selectable, explains the level-vs-edge-triggered conflict, reviews community workarounds, and details bradfitz's new Mutex.LockChan() demo that enables cancellable locking via select.
ConcurrencyGoGo proposal
0 likes · 14 min read

The article explains Go's native concurrency with lightweight goroutines and channel communication, outlines common deadlock errors, details unbuffered and buffered channel behavior, proper close rules, select usage, and presents graceful shutdown techniques using channels, context, and sync.WaitGroup, plus practical code examples.
ConcurrencyContextGo
0 likes · 20 min read

This article demystifies Kotlin's Flow, StateFlow, SharedFlow, and Channel by explaining their emission, storage, and loss mechanisms, illustrating common pitfalls with concrete code examples, and providing practical guidelines for choosing the right asynchronous data container in Android apps.
AndroidCoroutinesFlow
0 likes · 27 min read

The article dissects five common ways misusing the close operation on Go channels can cause runtime panics, explains the underlying reasons, demonstrates correct patterns such as the single‑sender rule and for‑range consumption, and provides interview‑ready takeaways.
ConcurrencyGoInterview
0 likes · 10 min read

This article dissects the frequent bugs that cause Go worker‑pool implementations to panic, deadlock, or leak goroutines, explains the four core principles for correct channel and WaitGroup usage, showcases five typical error patterns with concrete code, and provides a complete, production‑ready solution.
ConcurrencyGoWorker Pool
0 likes · 14 min read

The article explains how to reliably predict the output of Go channel interview questions by drawing execution timelines, distinguishing synchronization points from print order, handling buffered vs unbuffered channels, and spotting deadlocks, providing four concrete heuristics backed by code examples and runtime observations.
ConcurrencyGoInterview
0 likes · 12 min read

The article explains how using a for‑range loop to read from an unclosed Go channel can cause a goroutine to block forever, demonstrates the issue with a minimal example, compares explicit receives with for‑range, and shows that closing the channel is the only reliable fix, even for buffered channels.
ConcurrencyGochannel
0 likes · 7 min read

This article presents a curated collection of 30 essential Go interview questions covering language characteristics, object‑orientation, inheritance, polymorphism, goroutine basics, channel usage, defer execution order, memory allocation, slice vs array, map safety, error handling, context, Go modules, the GMP scheduler, and practical code examples for testing and middleware.
ConcurrencyContextGo
0 likes · 11 min read

The article walks readers through Go's concurrency model, explaining lightweight goroutines and channel communication, demonstrates common patterns such as worker pools and fan‑in/fan‑out with concrete code, highlights typical pitfalls like race conditions, deadlocks and memory leaks, and offers practical best‑practice recommendations for safe concurrent programming.
ConcurrencyGoWorker Pool
0 likes · 10 min read

LangGraph’s state management hinges on three core concepts—Channel as the storage unit, Annotation as the declarative API for Channels, and Reducer as the pure function that merges updates—understanding their interactions resolves common bugs, enables custom state schemas, and ensures correct concurrent node updates.
ConcurrencyLangGraphReducer
0 likes · 14 min read

Go provides two distinct constructors—new, a generic memory allocator returning a zero‑initialized pointer, and make, a specialized initializer that allocates and prepares slices, maps, and channels—explaining why both exist, how they differ, common pitfalls, and the language’s design philosophy of explicit, ready‑to‑use values.
GoReference Typeschannel
0 likes · 8 min read

The article recounts Tony Hoare’s pioneering CSP theory, explains how his rejection of shared‑memory concurrency shaped Go’s goroutine and channel model, and shows why every Go developer’s simple “go func()” and “make(chan int)” embody a half‑century of groundbreaking ideas.
CSPConcurrencyGo
0 likes · 10 min read

Even when a Go function returns cleanly, a spawned goroutine can remain blocked on an unbuffered channel after context cancellation, causing leaks that degrade performance under load; this article explains the hidden pitfall, demonstrates the faulty pattern, and provides robust fixes using buffered channels and context-aware goroutine design.
Contextchannelgoroutine-leak
0 likes · 8 min read

This article explores how a basic factorial calculation can be turned into a sophisticated concurrent system in Go, covering deadlock pitfalls, fan‑out/fan‑in pipelines, Redux‑style state management, and a controllable streaming factorial engine with pause and resume capabilities.
ConcurrencyFan-outGo
0 likes · 9 min read


21CTOOct 13, 2025 · Backend Development
This article demonstrates how Go's goroutines and channels can transform a sequential task that takes seconds per operation into a highly concurrent solution that completes millions of operations in just a few seconds, complete with code examples and performance benchmarks.
Gochannelgoroutine
0 likes · 5 min read

Discover how Go transforms massive concurrency challenges into elegant communication using goroutines, channels, select, and the GMP scheduler, and learn practical patterns such as producer-consumer, pub/sub, worker pools, pipelines, and a prime sieve, complete with runnable code snippets and engineering tips for robust backend systems.
ConcurrencyGoParallel Programming
0 likes · 12 min read

This article explains how the Crossbeam library extends Rust’s standard concurrency primitives by providing efficient MPMC channels, lock‑free data structures, scoped threads, and atomic memory tools, and demonstrates their use through concrete code examples and a detailed lock‑free queue design.
ConcurrencyCrossbeamRust
0 likes · 6 min read

This article walks through three Go server‑side scaling techniques—starting a goroutine per request, using a buffered channel queue, and implementing a full job/worker pool with separate task and worker channels—complete with code examples and practical considerations for high‑traffic applications.
BackendConcurrencyWorker Pool
0 likes · 9 min read

Learn how Go’s built‑in concurrency model using goroutines and channels can transform sequential code into responsive, high‑performance applications, with clear explanations of concurrency vs parallelism, practical code samples, synchronization techniques, and best practices for building scalable web servers.
ConcurrencyMutexParallelism
0 likes · 10 min read

This article compares Kotlin Channel and Flow, explains their design differences, outlines when to prefer each tool, provides step‑by‑step usage instructions, showcases four channel types, presents real‑world Android examples, and covers advanced patterns and exception handling for robust coroutine communication.
AndroidAsynchronous ProgrammingCoroutines
0 likes · 19 min read

This article compares Kotlin Channel and Flow, explains their distinct characteristics, shows when to prefer each in Android coroutine programming, provides step‑by‑step usage, multiple channel implementations, real‑world examples, advanced fan‑in/fan‑out patterns, and robust exception handling.
AndroidCoroutinesFlow
0 likes · 20 min read

This article explains Go's lightweight concurrency model, covering Goroutine creation, Channel communication, Select multiplexing, synchronization with WaitGroup and Context, common concurrency patterns such as worker pools and pub/sub, and provides best‑practice recommendations for building high‑performance concurrent programs.
ContextGochannel
0 likes · 7 min read

This article examines frequent mistakes developers make when writing concurrent Go programs—such as misusing context, leaking goroutines, mishandling channels, and causing data races—and provides concrete code examples, impact analyses, and best‑practice recommendations to write safer, more efficient Go concurrency code.
Best PracticesConcurrencyContext
0 likes · 9 min read

This article examines frequent mistakes in Go's concurrent programming—such as confusing concurrency with parallelism, assuming concurrency always speeds up execution, misusing channels versus mutexes, overlooking workload types, and misunderstanding contexts—provides detailed explanations, potential impacts, and best‑practice solutions with improved code examples.
ContextGoMutex
0 likes · 27 min read

This article explains Go’s built‑in concurrency model, detailing what Goroutines are, their lightweight and user‑mode nature, advantages such as low resource consumption and fast scheduling, how to launch them with the `go` keyword, their M:N scheduler, interaction with channels, and important best‑practice considerations.
Best PracticesGoM:N scheduling
0 likes · 7 min read

This article explains Go's concurrency model, detailing how goroutines are scheduled on logical processors, how to create and manage them, detect and resolve race conditions using atomic operations, mutexes, and channels, and demonstrates practical code examples for each concept.
BackendMutexatomic
0 likes · 19 min read

Go’s empty struct occupies zero bytes thanks to a special zerobase address, and understanding this behavior reveals how to use empty structs for memory‑efficient patterns such as sets, signal channels, and struct alignment tricks.
Memory Optimizationchannelempty struct
0 likes · 7 min read

The article explains why a seemingly straightforward Go program that creates an unbuffered channel, launches a goroutine to print a received value, and then sends a value deadlocks, analyzes the evaluation order of go statements, and shows how to fix the issue by moving the receive into a separate goroutine.
channeldeadlock
0 likes · 7 min read

This article examines five Go implementations of a broadcast notifier—using sync.Cond, channels, context, sync.WaitGroup, and sync.RWMutex—detailing their code, execution flow, and trade‑offs so readers can understand how each primitive achieves notification broadcasting.
BroadcastConcurrencyContext
0 likes · 9 min read

This article explains the shared behavior of Go's new and make functions, highlights their key differences—including supported types, return values, and initialization details—and provides concrete code examples to show how each should be used in practice.
Gochannelmake
0 likes · 7 min read

This comprehensive guide explains the fundamentals of concurrent programming in Go, covering the differences between parallelism and concurrency, process and thread concepts, and detailed usage of goroutines, channels, select statements, timers, mutexes, read‑write locks, wait groups, once, sync.Map, and atomic operations with practical code examples and diagrams.
ConcurrencyMutexParallelism
0 likes · 42 min read

This article provides a comprehensive guide to Go's concurrency model, covering goroutine creation, the scheduler, communication via channels, handling race conditions, and synchronization techniques using atomic operations and mutexes, complete with practical code examples and visual diagrams.
ConcurrencyGoMutex
0 likes · 27 min read

This article analyzes a Go program that deadlocks due to misuse of unbuffered channels and select, explains the underlying behavior of channels, blocking conditions, and select semantics, and provides a simple fix by buffering the stop channel while also covering Go's CSP roots and best‑practice guidelines.
ConcurrencyGobuffered-channel
0 likes · 20 min read

This article explains the zero‑size nature of Go's empty struct, demonstrates how its memory address behaves, shows its impact on struct alignment, and presents multiple practical patterns such as set implementation, large arrays, signal channels, no‑op methods, interface stubs, and the noCopy identifier.
Memorychannelempty struct
0 likes · 17 min read

The article explains Go’s built‑in Goroutine concurrency model and introduces the For‑Select‑Done design pattern, detailing its three components, ideal use cases, a complete code example, and the benefits of improved readability, flow control, and resource‑leak prevention.
ConcurrencyDesign PatternFor-Select-Done
0 likes · 4 min read

This article explains Go's native concurrency model, covering lightweight goroutines, channel communication patterns, scheduling details, and demonstrates a practical web‑crawler example that leverages these features for efficient parallel processing.
ConcurrencyGochannel
0 likes · 5 min read

This article explains Go's concurrency model, detailing how goroutines are scheduled onto logical processors, how to create and run them, handle race conditions with atomic operations, mutexes, and the race detector, and share data safely using unbuffered and buffered channels with practical code examples.
GoMutexatomic
0 likes · 19 min read

This article explains how unbuffered channels can cause goroutine leaks, demonstrates common race pitfalls when sharing pointers across goroutines, and presents channel‑based designs that serialize access to shared state, ensuring safe and efficient concurrency in Go programs.
Backendchannelgoroutine
0 likes · 6 min read

This article explains Go's concurrency model, detailing how goroutines are scheduled onto logical processors, how to create and run them, detect and resolve race conditions with atomic operations, mutexes, and channels, and demonstrates buffered versus unbuffered channel communication.
GoMutexRace Detection
0 likes · 18 min read

This article explores Go's powerful concurrency model, detailing how lightweight Goroutines and type‑safe Channels enable efficient parallel execution, and provides practical code examples, common pitfalls, and best‑practice guidelines for building high‑performance, maintainable Go applications.
ConcurrencyGoParallel Programming
0 likes · 5 min read

The article explains why a minimal Go program that creates an unbuffered channel, launches a goroutine to print a received value, and then sends a value deadlocks, analyzes the evaluation order of the go statement, and shows how restructuring the code eliminates the deadlock.
Go Languagechanneldeadlock
0 likes · 7 min read

The article explains why parallel RPC calls are needed for assembling complex objects, introduces a Go‑based MapReduce framework, walks through concrete code examples for product detail retrieval and UID cleaning, and details the internal architecture—including generate, mapper, reducer, and cancellation mechanisms—while providing full source snippets and execution flow.
ConcurrencyGoMapReduce
0 likes · 10 min read

This article explains Go's CSP-inspired concurrency model, detailing how lightweight Goroutines and typed Channels work together to enable efficient, non‑preemptive parallelism and common patterns like producer‑consumer, pipelines, and worker pools.
CSPConcurrencyGo
0 likes · 4 min read

This article explores Go's channel implementation—from its CSP‑inspired design and internal hchan structure to real‑world memory‑leak debugging, creation nuances, send/receive mechanics, and proper closing—providing developers with a comprehensive understanding of safe concurrent programming in Go.
ConcurrencyGoMemory Leak
0 likes · 31 min read

This article dissects Go’s select statement, explaining its I/O multiplexing purpose, compile‑time transformation via walkSelect and walkSelectCases, and the multi‑stage runtime algorithm in runtime.selectgo that handles various case patterns, lock ordering, polling randomness, and channel blocking behavior.
CompilerConcurrencyGo
0 likes · 33 min read

The article explains Go’s channel implementation as a lock‑protected FIFO queue composed of a circular buffer, send and receive wait queues, detailing creation, send/receive mechanics, closing behavior, a real‑world memory‑leak example, and why this design offers safe, performant concurrency comparable to mutexes.
ConcurrencyGoRuntime
0 likes · 29 min read

Learn how Go's lightweight goroutines work, why unlimited spawning can cause panics, and practical techniques—using sync.WaitGroup, buffered channels, and worker pools—to limit concurrent goroutine numbers safely and efficiently while preserving program correctness and performance.
ConcurrencyWorker Poolchannel
0 likes · 4 min read

This article explains Go’s concurrency fundamentals, distinguishing concurrency from parallelism, describing the CSP model built on goroutines and channels, and detailing the underlying M‑P‑G scheduler architecture—including thread models, runqueues, and load balancing—providing a comprehensive overview for developers.
CSPConcurrencyGo
0 likes · 11 min read

This article explains Java NIO’s non‑blocking I/O model, compares it with traditional BIO, details zero‑copy techniques, and walks through core components such as Channel, Buffer, and Selector with concrete code examples and diagrams, then shows how Redis leverages I/O multiplexing for high performance.
BufferJava NIORedis
0 likes · 20 min read

This article presents a comprehensive performance test of Go language channels, comparing them with Java's Disruptor and LinkedBlockingQueue across various object sizes, queue lengths, and producer/consumer thread counts, and provides practical recommendations based on the benchmark results.
GoHTTPchannel
0 likes · 13 min read

Go implements a two‑level N:M concurrency model where lightweight Goroutines (G) run on logical processors (P) backed by OS threads (M), with the GMP scheduler managing run queues and channels—mutex‑protected circular buffers with send/receive queues—providing efficient, preemptive multitasking and communication.
GMPGoRuntime
0 likes · 33 min read

This article explains the producer‑consumer concurrency model, its benefits such as decoupling and buffering, and demonstrates both unbuffered and buffered channel implementations in Go with complete code examples and a real‑world order‑processing scenario.
ConcurrencyGoProducer-Consumer
0 likes · 9 min read

The article explains Go’s scheduler (M, P, G), demonstrates goroutine, channel, and select usage, covers sync primitives, atomic ops, context cancellation, singleflight, common pitfalls, debugging tools, and a channel‑driven chatroom case study, offering best‑practice guidance for efficient concurrent programming.
GoSynchronizationchannel
0 likes · 21 min read

This article demonstrates how Kotlin Flow and Channel can address common Android development challenges such as ViewModel‑View communication and event handling, compares alternatives like LiveData and RxJava, and presents a practical MVI architecture implementation with code examples.
AndroidCoroutinesFlow
0 likes · 24 min read

This article explores Go's channel primitives in depth, covering their atomic FIFO behavior, internal queues, blocking semantics, common usage patterns such as futures, condition variables, semaphores, mutexes, and safe closing techniques, all illustrated with practical code examples.
CSPConcurrencyGo
0 likes · 18 min read

This article provides a comprehensive overview of Java NIO, explaining the differences between BIO and NIO, the concepts of synchronous/asynchronous and blocking/non‑blocking I/O, and detailing the usage and implementation of Buffers, Channels, and Selectors with code examples.
BufferNIOSelector
0 likes · 10 min read

This article compares consortium (alliance) chains with public chains, explains why consortium chains are favored in enterprise scenarios, and details Hyperledger Fabric's admission mechanism, including MSP identity, channel architecture, and member management, supported by diagrams and practical examples.
BlockchainMSPPKI
0 likes · 11 min read

This article provides a comprehensive guide to Java NIO, covering its core components—Channel, Buffer, and Selector—explaining the differences from traditional IO, demonstrating file, socket, and server implementations with detailed code samples, and illustrating advanced features such as memory‑mapped files, scatter/gather, and pipe communication.
BufferJavaNIO
0 likes · 31 min read

This article explains Java NIO fundamentals—including Channels, Buffers, and Selectors—compares them with traditional IO, and provides multiple runnable code examples such as FileChannel, SocketChannel, Selector loops, memory‑mapped files, scatter/gather, transferTo/From, Pipe and DatagramChannel to illustrate non‑blocking and high‑performance I/O.
BufferIOJava
0 likes · 31 min read

This article explains how Ctrip's flight Android app refactored its home page using Kotlin coroutines, Jetpack AAC components, and MVVM architecture, detailing the technical and business background, code patterns, production issues, and lessons learned for large‑scale mobile development.
AndroidCoroutinesJetpack
0 likes · 20 min read

This article walks through a real‑world Java file‑compression task, shows why a naïve implementation takes 30 seconds for a 20 MB batch, and demonstrates five progressive optimizations—BufferedInputStream, NIO Channel, memory‑mapped files, Pipe, and code snippets—that cut the time down to about one second while explaining the underlying I/O mechanisms.
BufferedInputStreamJavaMemoryMappedFile
0 likes · 12 min read


JavaEdgeNov 6, 2020 · Backend Development
Java NIO's Channel API offers bidirectional, asynchronous read/write operations using Buffers, with implementations such as FileChannel, DatagramChannel, SocketChannel, and ServerSocketChannel, and the article provides a practical FileChannel example illustrating buffer handling and the essential buf.flip() step.
NIOasynchronouschannel
0 likes · 3 min read

This article explains Go's channel primitive, comparing unbuffered and buffered channels, demonstrates how to avoid deadlocks with proper goroutine coordination, and shows typical patterns such as select, closing channels, and building concurrency controllers for robust backend services.
ConcurrencyGobuffered
0 likes · 14 min read

This article provides a comprehensive source‑level examination of Go's channel mechanism—including usage examples, the internal hchan data structure, creation, read/write operations, closing behavior, and common pitfalls—based on the Go 1.14 runtime implementation.
BufferGoRuntime
0 likes · 14 min read

The article explains why creating unlimited Goroutines in Go can exhaust system resources, demonstrates the problem with a sample program, and presents practical methods—including channel throttling, sync.WaitGroup, and third‑party Goroutine pools—to safely limit concurrency and improve performance.
ConcurrencyGochannel
0 likes · 10 min read

This article introduces Swoole's Coroutine Channel for inter‑coroutine communication, explains its memory‑efficient implementation and key methods such as __construct, push, pop, stats, close, length, isEmpty, isFull, capacity and errCode, and provides a complete PHP example demonstrating producer‑consumer behavior.
ConcurrencyPHPSwoole
0 likes · 5 min read

This article explains what Go channels are, how they are implemented in the runtime, their data structures, creation, sending, receiving, closing semantics, common pitfalls, and includes detailed code examples to illustrate channel behavior in concurrent programs.
BufferConcurrencyGo
0 likes · 25 min read

This article explains Go's channel feature, covering its design philosophy, channel types (bidirectional and directional), core operations such as send, receive, close, capacity queries, detailed execution rules for different channel states, and includes several illustrative code examples.
BackendConcurrencyGo
0 likes · 10 min read

This article explains Go's channel primitive in depth, covering its conceptual model, types, operations, internal queues, rule scenarios, practical code examples, and best‑practice tips for building clear and efficient concurrent programs.
ConcurrencyGoGo Programming
0 likes · 12 min read

This article introduces Java NIO fundamentals, explaining the key concepts of Channel, Buffer, and Selector, comparing them with traditional I/O streams, and providing code examples for file reading, writing with FileChannel, and illustrating how selectors enable single‑threaded multiplexed I/O handling.
BackendBufferI/O
0 likes · 8 min read

This article explains how Spring Cloud Stream uses binders to isolate applications from messaging middleware, defines channels for input and output, demonstrates publish‑subscribe with RabbitMQ, shows how consumer groups prevent duplicate processing, and introduces message partitioning for ordered handling.
BinderConsumer GroupMessage Partitioning
0 likes · 11 min read

This article explains Java NIO fundamentals—including synchronous vs asynchronous, blocking vs non‑blocking I/O—covers core components such as Channel, Buffer, and Selector, and provides complete example code for file operations and a single‑threaded server/client, comparing NIO with traditional I/O.
BufferNIOSelector
0 likes · 16 min read

This article explains the internal workflow of Netty when launching a server, covering why Netty is chosen over raw JDK NIO, the key components created during bootstrap, the step‑by‑step source‑code analysis of channel creation, initialization, registration, and the final bind operation that activates the server.
EventLoopJava NIONetty
0 likes · 18 min read
