Home

thread

The term thread derives from Old English thræd meaning a cord or string. It originally referred to a long slender strand of material used for sewing or weaving. In modern usage the word also denotes a conceptual line of execution in computing, linking the textile and software senses by analogy.

In textiles, a thread is a flexible strand produced by twisting together fibers such as cotton, silk,

In computing, a thread is the smallest unit of execution within a process. Threads within the same

Other uses include discussion threads in forums and message boards, or as a term in protocol development

or
synthetic
filaments.
Threads
are
wound
on
spools
or
cones
and
used
for
sewing,
embroidery,
and
weaving.
Common
variations
differ
in
fiber,
diameter,
twist,
and
finish,
affecting
strength,
elasticity,
and
appearance.
Machine
sewing
often
requires
consistent
thread
tension
and
correct
needle
size
to
prevent
fraying
or
breakage.
process
share
memory
and
system
resources,
enabling
concurrent
or
parallel
operations.
A
program
can
create
multiple
threads
to
perform
tasks
such
as
user
interface
handling,
background
processing,
or
I/O
while
maintaining
responsiveness.
Threads
undergo
a
lifecycle
from
creation
to
runnable,
blocked
or
waiting,
and
termination.
Scheduling
and
context
switching
control
which
thread
runs.
Synchronization
primitives—locks,
mutexes,
semaphores,
monitors—coordinate
access
to
shared
data
and
prevent
race
conditions.
Common
pitfalls
include
deadlocks
and
livelocks;
thread
safety
and
atomic
operations
are
central
concerns.
Many
environments
employ
thread
pools
to
reuse
threads
for
efficiency
and
to
bound
resource
usage.
There
are
kernel
threads
and
user-level
or
managed
threads,
with
varying
performance
and
portability
characteristics,
and
some
platforms
offer
lighter-weight
fibers
or
green
threads
as
alternatives.
for
threaded
communication.
The
precise
meaning
of
thread
depends
on
context.