Tag

Context

1 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.

ConcurrencyContextGo
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.

ContextMulti-Clustercloud-native
0 likes · 6 min read
Master Kubernetes Contexts and Switch Clusters Efficiently with kubectx
KooFE Frontend Team
KooFE Frontend Team
May 25, 2025 · Frontend Development

How to Prevent Unnecessary Re‑renders with React Context Providers

Learn why React components re‑render, distinguish parent and owner trees, and apply custom Context Provider patterns to limit updates only to components that consume the context, thereby improving performance without extra memoization.

Component RenderingContextPerformance
0 likes · 9 min read
How to Prevent Unnecessary Re‑renders with React Context Providers
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.

ConcurrencyContextGo
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.

ConcurrencyContextGo
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.

CancellationConcurrencyContext
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.

ContextLaravelPHP
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.

CancellationConcurrencyContext
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.

Component CommunicationContextHooks
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.

ContextJavaPerformance
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.

CancellationConcurrencyContext
0 likes · 26 min read
Deep Dive into Go's context Package: Structure, Interfaces, and Cancellation Mechanism
KooFE Frontend Team
KooFE Frontend Team
Sep 24, 2023 · Frontend Development

Mastering React Design Patterns: Composite, Uncontrolled, and Render Props

Explore essential React design patterns—including component composition, uncontrolled composite components, and render props—through detailed explanations, practical code examples, and best practices that improve maintainability, scalability, and developer experience in modern frontend development.

Compound ComponentContextDesign Patterns
0 likes · 15 min read
Mastering React Design Patterns: Composite, Uncontrolled, and Render Props
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.

ContextHooksPerformance
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.

CancellationConcurrencyContext
0 likes · 19 min read
Understanding Go's Context: Source Code Analysis and Practical Usage
KooFE Frontend Team
KooFE Frontend Team
Aug 14, 2022 · Frontend Development

Mastering React Re-renders: When, Why, and How to Optimize Performance

This comprehensive guide explains what React re‑renders are, distinguishes necessary from unnecessary re‑renders, outlines the four triggers—state, parent re‑render, context, and hooks—and provides practical patterns and anti‑patterns, including memoization, useMemo/useCallback, and key management, to improve component performance.

ContextPerformanceReact
0 likes · 15 min read
Mastering React Re-renders: When, Why, and How to Optimize Performance
KooFE Frontend Team
KooFE Frontend Team
May 14, 2022 · Frontend Development

Mastering Global State in React: useReducer + Context Explained

This article explains how useReducer can replace useState for complex state logic, introduces Context for sharing data across components, demonstrates their combined usage with code examples, and compares this approach to React‑Redux, highlighting differences in data flow, rendering behavior, and suitable scenarios.

ContextReactState Management
0 likes · 5 min read
Mastering Global State in React: useReducer + Context Explained
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.

ContextGogoroutine
0 likes · 10 min read
Implementing a Concurrent-Safe Queue in Go