Thread

From Rosetta Code
Revision as of 19:34, 8 February 2008 by rosettacode>Mwn3d (New page: Category:EncyclopediaA '''thread''' is a particular flow of operations in a computer. Programs can be "multi-threaded", where certain parts of the programs will compete for [[:Category...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A thread is a particular flow of operations in a computer. Programs can be "multi-threaded", where certain parts of the programs will compete for system resources. Threads are useful for servers, where each client connecting to a server will "spawn" a new thread for its own operations. A program can also run multiple operations concurrently, also known as forking a process. With single-core processors, multi-threading does not usually provide much of an advantage, but with multiple cores, a computer can run the threads concurrently and do multiple programs' work at once.