Tag

Context

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jun 3, 2025 · Backend Development

Understanding Go's Concurrency Model: Goroutine, Channel, Select, WaitGroup, and Context

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.

ContextGoWaitGroup
0 likes · 7 min read
Understanding Go's Concurrency Model: Goroutine, Channel, Select, WaitGroup, and Context
Linux Ops Smart Journey
Linux Ops Smart Journey
May 28, 2025 · Cloud Native

Master Kubernetes Contexts and Switch Clusters Efficiently with kubectx

Learn how to define and manage multiple Kubernetes clusters using contexts, extract certificates, configure contexts for production and test environments, and boost switching efficiency with the kubectx tool, complete with step‑by‑step commands and practical tips.

ContextKubernetescloud native
0 likes · 6 min read
Master Kubernetes Contexts and Switch Clusters Efficiently with kubectx
FunTester
FunTester
Mar 26, 2025 · Backend Development

Common Go Concurrency Errors and Best Practices

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
Common Go Concurrency Errors and Best Practices
Raymond Ops
Raymond Ops
Jan 7, 2025 · Backend Development

Mastering Go’s Context: Control Goroutine Lifecycles and Cancel Operations

This article explains Go's Context concept, its role in managing Goroutine lifecycles, the standard library's context package API, how to create and cancel contexts, share values safely, and best practices for using Contexts in concurrent backend applications.

ContextGobackend development
0 likes · 11 min read
Mastering Go’s Context: Control Goroutine Lifecycles and Cancel Operations
Go Programming World
Go Programming World
Dec 17, 2024 · Fundamentals

Resolving Circular Dependencies in Go's context Package with XTest and export_test.go

This article explains how Go developers can break circular import problems in the context package by using XTest‑prefixed helper functions together with a regular Test wrapper, and also demonstrates the export_test.go "backdoor" technique for accessing unexported symbols in black‑box tests.

Circular DependencyContextGo
0 likes · 10 min read
Resolving Circular Dependencies in Go's context Package with XTest and export_test.go
Go Programming World
Go Programming World
Dec 10, 2024 · Backend Development

Deep Dive into Go's Context Package: Design, Implementation, and Usage

This article thoroughly explains the design and implementation of Go's context package, covering its core interfaces, various concrete types, cancellation propagation, deadline handling, value storage, and the internal mechanisms that enable concurrent-safe control flow and data passing across context trees.

CancellationContextGo
0 likes · 30 min read
Deep Dive into Go's Context Package: Design, Implementation, and Usage
php中文网 Courses
php中文网 Courses
Dec 4, 2024 · Backend Development

Using the Laravel context() Helper for Managing Application Context Data

The article introduces Laravel's new context() helper, demonstrating its basic usage and a real‑world multi‑tenant example, showing how to add, retrieve, and default context values and simplify shared data handling throughout the request lifecycle.

BackendContextLaravel
0 likes · 2 min read
Using the Laravel context() Helper for Managing Application Context Data
FunTester
FunTester
Jul 24, 2024 · Backend Development

Managing Request Scope, Cancellation, and Timeouts with Go's context Package

This article explains how to use Go's context package for managing request-scoped data, cancellation, deadlines, and timeouts, compares it with Java's ThreadLocal approach, and provides practical code examples for creating contexts, handling goroutine lifecycles, and applying context in network programming.

BackendCancellationContext
0 likes · 12 min read
Managing Request Scope, Cancellation, and Timeouts with Go's context Package
Code Mala Tang
Code Mala Tang
Jul 12, 2024 · Frontend Development

Mastering React Component Communication: 7 Essential Techniques

Explore seven core methods for React component communication—including Props, State Lifting, Context, Refs, Hooks, Event Emitters, and Redux—detailing practical code examples, key considerations, and best practices to help developers choose the optimal approach for various application scenarios.

ContextHooksProps
0 likes · 16 min read
Mastering React Component Communication: 7 Essential Techniques
JD Retail Technology
JD Retail Technology
May 28, 2024 · Backend Development

Fast Issue Tracing in High‑Concurrency Java Systems Using a Custom CommonContext

This article explains how to use a custom CommonContext with conditional logging and lambda‑based delayed evaluation to quickly trace issues in high‑concurrency Java back‑end systems without degrading performance, and demonstrates the performance improvements through before‑and‑after measurements.

ContextJavahigh concurrency
0 likes · 10 min read
Fast Issue Tracing in High‑Concurrency Java Systems Using a Custom CommonContext
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 27, 2024 · Fundamentals

Deep Dive into Go's context Package: Structure, Interfaces, and Cancellation Mechanism

This article provides a comprehensive analysis of Go's context package, explaining its purpose, the key interfaces and structs, the back‑trace chain and tree architecture, and how cancellation, deadlines, and value propagation are implemented in the standard library source code.

CancellationContextGo
0 likes · 26 min read
Deep Dive into Go's context Package: Structure, Interfaces, and Cancellation Mechanism
37 Interactive Technology Team
37 Interactive Technology Team
Jul 26, 2023 · Backend Development

Investigation and Resolution of CPU Spike in a Kafka-Go Consumer Using pprof

Using Go’s pprof, the team traced a gradual CPU spike in a high‑throughput kafka‑go consumer to a saturated commit queue and repeatedly nested context values, which forced costly lookups; eliminating the unnecessary trace‑id context injection (or recreating a fresh context each loop) resolved the issue and reduced CPU usage to under 2 %.

CPU ProfilingConsumerContext
0 likes · 10 min read
Investigation and Resolution of CPU Spike in a Kafka-Go Consumer Using pprof
ByteFE
ByteFE
Feb 8, 2023 · Frontend Development

React Context Re‑render Issues and an Optimized use‑context‑selector Implementation

This article explains why passing an object as a React Context Provider value can cause unnecessary re‑renders, introduces the community‑made use‑context‑selector library to mitigate the problem, analyzes its limitations, and presents a custom optimized implementation using useSyncExternalStore for precise component updates.

ContextHooksReact
0 likes · 17 min read
React Context Re‑render Issues and an Optimized use‑context‑selector Implementation
Tencent Cloud Developer
Tencent Cloud Developer
Aug 22, 2022 · Fundamentals

Understanding Go's Context: Source Code Analysis and Practical Usage

The article explains Go's context package by dissecting its source‑code implementations—emptyCtx, valueCtx, cancelCtx, and timerCtx—showing how the API (Background, WithCancel, WithTimeout, WithDeadline, WithValue) builds a tree‑structured cancellation and timeout system that simplifies goroutine lifecycle management and request‑scoped data propagation.

CancellationContextGo
0 likes · 19 min read
Understanding Go's Context: Source Code Analysis and Practical Usage
IEG Growth Platform Technology Team
IEG Growth Platform Technology Team
Feb 21, 2022 · Backend Development

Deep Dive into Go net/http and Gin Framework Source Code

This article provides a comprehensive analysis of Go's net/http library and the Gin framework, detailing request handling flow, router implementation, middleware chaining, and context management, while presenting key source code excerpts to illustrate how HTTP services are built and extended in Go.

ContextGinGo
0 likes · 18 min read
Deep Dive into Go net/http and Gin Framework Source Code
New Oriental Technology
New Oriental Technology
Dec 10, 2021 · Backend Development

Implementing a Concurrent-Safe Queue in Go

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.

ContextGoQueue
0 likes · 10 min read
Implementing a Concurrent-Safe Queue in Go
Python Programming Learning Circle
Python Programming Learning Circle
Mar 30, 2021 · Backend Development

Understanding Django Templates for Building User Interfaces

This article explains how to configure, render, and extend Django templates, covering template directories, context data, built‑in tags and filters, reusable blocks, includes, and creating custom tags to efficiently build dynamic web interfaces.

ContextCustom TagsDjango
0 likes · 16 min read
Understanding Django Templates for Building User Interfaces
Tencent Cloud Developer
Tencent Cloud Developer
Feb 24, 2021 · Backend Development

Common Concurrency Bugs in Go and Their Fixes

Analyzing several major Go projects, the article catalogs frequent concurrency pitfalls—such as unbuffered channels, WaitGroup deadlocks, context leaks, loop‑variable races, double channel closes, timer errors, and RWMutex misuse—and offers concise, idiomatic fixes to prevent blocking, leaks, panics, and deadlocks.

BugsChannelsContext
0 likes · 10 min read
Common Concurrency Bugs in Go and Their Fixes
360 Tech Engineering
360 Tech Engineering
Jul 12, 2018 · Backend Development

Using Go Context Cancellation: Patterns, Best Practices, and Common Pitfalls

This article explains why and how to use Go's context cancellation feature, covering listening for cancel events, emitting cancellations, time‑based timeouts, practical code examples, and important pitfalls to write faster and more robust backend services.

BackendCancellationContext
0 likes · 8 min read
Using Go Context Cancellation: Patterns, Best Practices, and Common Pitfalls
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
Jul 11, 2018 · Backend Development

Mastering Go Context Cancellation: Patterns, Best Practices, and Real-World Examples

Learn how to leverage Go's context cancellation feature with practical patterns, code examples, and best practices—including listening for cancel events, submitting cancellations, time‑based timeouts, and common pitfalls—to build faster, more robust backend services.

BackendCancellationContext
0 likes · 10 min read
Mastering Go Context Cancellation: Patterns, Best Practices, and Real-World Examples