DELAPARRA
Index
Color
NL
Category: Programming paradigms

Thread

Explained by Updated

What is Thread?

Thread: An independent path of execution within a process, sharing memory with other threads in the same process. A thread is an independent path of execution inside a process. A process can run several threads at once, and they share the same memory. Shared memory makes threads efficient, because they can work on the same data without copying it. It also makes them risky: two threads changing the same data at the same time cause race conditions unless access is coordinated with locks or other tools.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Thread

What should you keep in mind with Thread?

Traditional PHP sidesteps this. Each request runs in its own process, so your code rarely deals with threads directly. Java, C#, Go and Python use them more openly. In web applications, concurrency is usually handled with multiple processes and queue workers instead, which isolates failures and keeps code simpler. When you do use threads, keep shared mutable state to a minimum.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with T

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.