Tagged articles
sync
26 articles · Page 1 of 1
Learn how Go's sync package provides essential concurrency primitives—Mutex, RWMutex, WaitGroup, Once, Cond, and Pool—through clear examples and best‑practice patterns that prevent data races, deadlocks, and performance pitfalls, enabling safe, elegant, and efficient goroutine coordination.
ConcurrencyGoMutex
0 likes · 7 min read

Over the past two years, Go’s sync and sync/atomic packages have introduced new APIs like WaitGroup.Go, enhanced Map methods, modernized atomic types, restructured internal implementations, and added developer‑friendly safeguards such as noCopy, all aimed at improving usability, safety, and performance for concurrent Go programs.
APIConcurrencyGo
0 likes · 12 min read

This article explains why Go's goroutines outperform traditional threads, details the GMP scheduling model, shows how to avoid data races with sync primitives, and provides ready-to-use concurrency libraries and patterns with clear code examples.
ConcurrencyGMPParallelism
0 likes · 8 min read

This article explains Go's sync.WaitGroup concurrency primitive, covering its core methods, a classic example, key characteristics, common pitfalls, and best‑practice rules to reliably wait for multiple goroutines to finish before proceeding.
BackendConcurrencygoroutine
0 likes · 9 min read

This article provides a comprehensive guide to Go's sync package, explaining the purpose, usage, code examples, and best‑practice recommendations for each synchronization primitive such as Mutex, RWMutex, WaitGroup, Once, Cond, Pool, and sync.Map.
Gosync
1 likes · 8 min read

This article reviews the Go memory model first written in 2009, highlights missing documentation for sync and sync/atomic APIs, proposes concrete textual and typed‑atomic extensions, and explains why certain compiler optimizations must remain prohibited to preserve clear, race‑free semantics.
ConcurrencyGoHappens-Before
0 likes · 24 min read

This article explains how to migrate MySQL table data to Elasticsearch using a one‑time full sync, a scheduled incremental sync, addresses strong consistency challenges, and introduces Alibaba's Canal framework for reliable binlog‑based data replication.
BackendCanalElasticsearch
0 likes · 14 min read

Explore how Rust’s Send and Sync marker traits guarantee thread‑safe ownership transfer and shared references, with clear explanations, practical code examples, custom type implementations, common pitfalls, and performance considerations to help you write reliable concurrent programs.
ArCMutexRust
0 likes · 8 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 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 walks through the challenges of offering both asynchronous and synchronous interfaces for a Rust API client, evaluates naive copy‑paste solutions, explores runtime‑based wrappers and the maybe_async procedural macro, and finally presents a clean, feature‑flagged design that avoids code duplication and compile‑time overhead.
CargoRustasync
0 likes · 23 min read

This guide explains how to safely shut down or reboot a Linux server by checking logged‑in users, running processes, and network connections, notifying users, running sync, and using the appropriate shutdown, reboot, halt, or poweroff commands with their key options.
Linuxcommandsnetstat
0 likes · 9 min read

This article explains how MySQL 8.0.32 processes the flush, sync, and commit subphases during a two‑phase commit, detailing the roles of leader and follower threads, log handling, system variables, and the conditions that trigger binlog rotation and persistence.
InnoDBMySQLbinlog
0 likes · 10 min read

This article provides a comprehensive, step‑by‑step analysis of Go’s core concepts—including nil handling, the context package, string and rune internals, unsafe pointers, memory alignment, WaitGroup, semaphores, channels, slices, map implementations, sync.Map, garbage collection, and reflection—illustrated with concrete code examples and detailed reasoning.
ConcurrencyContextGarbage Collection
0 likes · 30 min read

Atuin replaces the traditional shell history with a SQLite‑backed, feature‑rich UI, offering encrypted synchronization across machines, detailed command metadata, and flexible search capabilities, while providing multiple installation methods and shell plugin integrations for zsh, bash, and fish.
AtuinSQLitecommand-line
0 likes · 8 min read

Go maps are not safe for concurrent access, so programs can panic when multiple goroutines read and write the same map; to prevent this you can use sync.Once for immutable data, protect maps with sync.RWMutex, employ sharded locks via concurrent‑map, or use the built‑in sync.Map, each offering different performance trade‑offs depending on read/write ratios and concurrency level.
ConcurrencyGoRWMutex
0 likes · 13 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 safety mechanisms, demonstrates how to build a thread‑safe queue using mutexes, sync.Cond, and context cancellation, and provides complete example code and tests to illustrate proper synchronization and resource management.
ConcurrencyContextQueue
0 likes · 10 min read

This article explains the different lock types provided by Go's sync package—including Mutex, RWMutex, Cond, WaitGroup, Once, Map, and Pool—detailing their use cases, code examples, and how they help manage concurrency safely and efficiently.
ConcurrencyMutexPool
0 likes · 14 min read

This step‑by‑step guide shows how to clone a forked GitHub repository, configure the upstream remote, fetch and merge upstream updates, resolve any conflicts, and push the synchronized code back to your fork, ensuring your local copy stays up to date.
GitGitHubfetch
0 likes · 8 min read

This article explores the intricacies of Grand Central Dispatch on iOS, debunking common misconceptions about main thread and main queue execution, analyzing the internal handling of synchronous tasks, and demonstrating how run‑loop activation influences queue‑thread relationships through a series of code experiments.
GCDasyncdispatch_queue
0 likes · 14 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

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 guide compiles the most frequent Ethereum synchronization problems—such as blocks lagging by dozens, the sync process stalling at 99%, zero block height or balance readings, and abnormal logs—and provides step‑by‑step commands, hardware tips, cache settings, and log‑analysis techniques to diagnose and resolve them.
BlockchainEthereumNode
0 likes · 9 min read

The article provides a detailed technical analysis of WeChat's communication protocol, describing its SYNC‑based state synchronization, short and long connection designs, packet structures, SyncKey handling, multi‑device login, and differences between mobile and web clients, offering insight for developers and engineers.
WeChatmobile messagingnetwork
0 likes · 18 min read

This article explains Redis replication's two core mechanisms—synchronization and command propagation—detailing the SYNC workflow, how masters propagate writes to slaves, and how the PSYNC command enables efficient partial resynchronization after disconnections.
Master‑SlavePSYNCdatabase
0 likes · 3 min read
