Tag

Multithreading

1 views collected around this technical thread.

Sohu Tech Products
Sohu Tech Products
Jun 11, 2025 · Fundamentals

Mastering iOS Locks: Types, Usage, and Performance Comparison

This article explains the relationship between locks and multithreading on iOS, introduces common lock types such as NSRecursiveLock, NSConditionLock, OSSpinLock, os_unfair_lock, pthread_mutex, and @synchronized, demonstrates resource contention with code examples, discusses lock selection, priority inversion, and provides a performance ranking of various locks.

ConcurrencyLocksMultithreading
0 likes · 22 min read
Mastering iOS Locks: Types, Usage, and Performance Comparison
IT Services Circle
IT Services Circle
Jun 11, 2025 · Databases

How to Count 100 Million Redis Keys Efficiently Without Crashing the Cluster

This article explains why the KEYS * command is dangerous for large Redis deployments and presents several practical alternatives—including SCAN, multithreaded SCAN, cluster‑wide parallel scans, built‑in counters, and real‑time incremental counting—along with code samples, performance comparisons, and guidance on choosing the right solution.

ClusterKey CountingMultithreading
0 likes · 10 min read
How to Count 100 Million Redis Keys Efficiently Without Crashing the Cluster
Python Programming Learning Circle
Python Programming Learning Circle
Jun 10, 2025 · Backend Development

How to Scrape Beike Real‑Estate Listings with Python: A Complete Guide

This tutorial walks you through building a Python web‑scraper for Beike (Lianjia) second‑hand property listings, covering session spoofing, dynamic parameters, pagination, multithreaded detail fetching, data cleaning, and exporting results to Excel in a step‑by‑step manner.

BeautifulSoupData ExtractionMultithreading
0 likes · 18 min read
How to Scrape Beike Real‑Estate Listings with Python: A Complete Guide
Java Captain
Java Captain
Jun 10, 2025 · Fundamentals

Understanding Java Monitors: How Thread Synchronization Works

Java monitors provide a mechanism for thread synchronization by associating each object with a monitor lock, comprising an entry list, owner thread, and wait set, and the article explains their structure, thread state transitions, and demonstrates usage with a practical code example.

ConcurrencyJavaMonitor
0 likes · 6 min read
Understanding Java Monitors: How Thread Synchronization Works
Lobster Programming
Lobster Programming
Jun 3, 2025 · Backend Development

How ThreadLocal Can Cause Memory Leaks in Java Multithreading

This article explains how ThreadLocal creates per‑thread variable copies, demonstrates its usage with sample Java code, illustrates the internal storage structure, and reveals why improper handling can lead to memory leaks when thread‑local values persist in thread pools.

ConcurrencyJavaMemory Leak
0 likes · 3 min read
How ThreadLocal Can Cause Memory Leaks in Java Multithreading
FunTester
FunTester
May 30, 2025 · Databases

MySQL Performance Testing Practice: Simulating New User Registration

This article demonstrates a practical MySQL performance test using a simulated e‑commerce scenario, detailing the user table schema, multithreaded Java code for inserting random user records, parameterized inputs, success counting, and resource management to evaluate and improve registration throughput.

JavaMultithreadingMySQL
0 likes · 9 min read
MySQL Performance Testing Practice: Simulating New User Registration
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
May 27, 2025 · Operations

How to Achieve Ultra-Fast Video Transcoding with Multi‑Threading and Clustering

This article examines the factors affecting media transcoding duration, explains why decoding dominates processing time, and presents multi‑threaded FFmpeg techniques and a cluster‑based architecture that split video into TS segments to dramatically reduce overall transcoding latency.

FFmpegMultithreadingcluster computing
0 likes · 12 min read
How to Achieve Ultra-Fast Video Transcoding with Multi‑Threading and Clustering
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 24, 2025 · Backend Development

Printing ABC in Order with Multiple Threads Using Semaphore in Java

This article explains how to create three Java threads that print the characters A, B, and C in strict order, repeat the sequence twenty times, and demonstrates three implementations—unordered printing, ordered printing with Semaphore, and a looped version—complete with full source code examples.

ConcurrencyJavaMultithreading
0 likes · 7 min read
Printing ABC in Order with Multiple Threads Using Semaphore in Java
Java Captain
Java Captain
May 21, 2025 · Fundamentals

Understanding Java Thread States and Their Transitions with Example Code

This article explains the six Java thread states defined in java.lang.Thread.State, describes the meaning of each state, illustrates the possible state transitions, and provides three runnable code examples that demonstrate NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING and TERMINATED states along with their console outputs.

ConcurrencyExampleJava
0 likes · 11 min read
Understanding Java Thread States and Their Transitions with Example Code
Deepin Linux
Deepin Linux
May 20, 2025 · Fundamentals

Understanding and Preventing Deadlocks in C++ Multithreaded Programming

This article explains what deadlocks are in C++ multithreaded programming, outlines their causes and four necessary conditions, presents common scenarios and code examples, and offers practical strategies such as consistent lock ordering, std::lock, std::scoped_lock, recursive mutexes, and lock hierarchies to avoid them.

C++ConcurrencyDeadlock
0 likes · 20 min read
Understanding and Preventing Deadlocks in C++ Multithreaded Programming
JD Tech Talk
JD Tech Talk
May 19, 2025 · Backend Development

Detailed Explanation of Java ConcurrentHashMap Source Code: Constructors, put, get, resize, and Concurrency Mechanisms

This article provides an in‑depth analysis of the Java ConcurrentHashMap implementation, covering its constructor logic, hash‑table sizing, the core put and get operations, element counting with addCount, multi‑threaded resizing via transfer, treeification of bins, removal, computeIfAbsent, and the design choices that forbid null keys and values to simplify concurrency handling.

CASConcurrencyConcurrentHashMap
0 likes · 36 min read
Detailed Explanation of Java ConcurrentHashMap Source Code: Constructors, put, get, resize, and Concurrency Mechanisms
macrozheng
macrozheng
May 16, 2025 · Fundamentals

Why More Threads Can Slow Down Your Java App—and How to Optimize Context Switching

This article explains how CPU time slices, hyper‑threading, and context‑switching affect multithreaded performance, outlines the costs of thread switches, and offers practical strategies such as lock‑free programming, CAS, reducing thread count, and using coroutines to improve efficiency.

CPU schedulingJava ConcurrencyMultithreading
0 likes · 11 min read
Why More Threads Can Slow Down Your Java App—and How to Optimize Context Switching
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 12, 2025 · Backend Development

Why Using synchronized on a Local Variable Fails to Lock in Java Multithreading

The article demonstrates that synchronizing on a locally created object does not provide proper thread safety, shows the resulting chaotic output, and explains how moving the lock object to a class field resolves the issue, illustrated with Java code and debugging screenshots.

ConcurrencyJavaMultithreading
0 likes · 4 min read
Why Using synchronized on a Local Variable Fails to Lock in Java Multithreading
Java Captain
Java Captain
May 12, 2025 · Fundamentals

Understanding Java Thread Pools: Design, Implementation, and Usage

This article explains the purpose, advantages, design principles, configuration parameters, task queue options, rejection policies, lifecycle management, and internal execution flow of Java's ThreadPoolExecutor, providing code examples and detailed insights into how thread pools work in concurrent applications.

ConcurrencyExecutorJava
0 likes · 30 min read
Understanding Java Thread Pools: Design, Implementation, and Usage
IT Services Circle
IT Services Circle
May 10, 2025 · Backend Development

Understanding Java synchronized: Locks, Optimizations, and Example Code

This article explains how Java's synchronized keyword works, covering object and class locks, lock upgrades such as biased, lightweight, and heavyweight locks, the underlying monitor implementation, example code for a thread‑safe counter, and performance considerations for high‑concurrency scenarios.

ConcurrencyJavaMultithreading
0 likes · 7 min read
Understanding Java synchronized: Locks, Optimizations, and Example Code
Deepin Linux
Deepin Linux
May 8, 2025 · Fundamentals

Comprehensive Guide to CPU Performance Optimization and Tools

This article provides an in‑depth overview of CPU performance metrics, practical optimization techniques—including algorithm selection, compiler flags, cache‑aware programming, and vectorization—along with real‑world case studies and a detailed survey of Linux profiling and analysis tools for developers.

CPUCompilerMultithreading
0 likes · 31 min read
Comprehensive Guide to CPU Performance Optimization and Tools
AntTech
AntTech
May 7, 2025 · Game Development

Performance Optimization Techniques for Alipay Mini‑Games Runtime

This article details the architectural analysis and a series of six optimization strategies—including multithreading, independent audio, file‑system improvements, text rendering, dedicated render thread, and iOS high‑performance mode—that collectively boost frame rates, reduce latency, and enhance the overall user experience of Alipay mini‑games.

AlipayMultithreadingPerformance
0 likes · 15 min read
Performance Optimization Techniques for Alipay Mini‑Games Runtime
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 7, 2025 · Backend Development

Understanding Java Semaphore: Methods, Usage, and Example Code

This article explains Java's Semaphore concurrency primitive, its core methods, fair vs. non‑fair modes, typical scenarios such as rate limiting and resource pooling, and provides two complete code examples demonstrating thread coordination and download throttling.

ConcurrencyJavaMultithreading
0 likes · 6 min read
Understanding Java Semaphore: Methods, Usage, and Example Code
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 6, 2025 · Backend Development

Understanding Java CyclicBarrier with Practical Examples

This article explains Java's CyclicBarrier synchronization tool, compares it with CountDownLatch, demonstrates basic and array‑sum examples with reusable barriers and callback actions, and shows how it can coordinate multiple threads for tasks such as parallel computation and result aggregation.

ConcurrencyCyclicBarrierJava
0 likes · 6 min read
Understanding Java CyclicBarrier with Practical Examples
Deepin Linux
Deepin Linux
May 6, 2025 · Fundamentals

Understanding Processes and Threads: Concepts, Differences, and When to Use Them

This article explains the fundamental concepts of processes and threads, their relationship, resource allocation, scheduling, communication methods, practical use cases, and interview preparation tips, helping readers choose between multiprocessing and multithreading for various scenarios.

ConcurrencyMultiprocessingMultithreading
0 likes · 22 min read
Understanding Processes and Threads: Concepts, Differences, and When to Use Them