Thread (computing): Difference between revisions

Content deleted Content added
m Reverting possible vandalism by 90.91.109.241 to version by 195.159.197.115. Report False Positive? Thanks, ClueBot NG. (4263245) (Bot)
Tag: Reverted
Line 105:
===Thread pools===
{{Main|Thread pool pattern}}
A popular programming pattern involving threads is that of [[Thread pool pattern|thread pools]] where a set number of threads are created at startup that then wait for a task to be assigned. When a new task arrives, it wakes up, completes the task and goes back to waiting. This avoids the relatively expensive thread creation and destruction functions for every task performed and takes thread management out of the application developer's hand and leaves it to a library or the operating system that is better suited to optimize threadthreads management.
 
===Multithreaded programs vs single-threaded programs pros and cons===