Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it only manipulates shared data structures in a manner that guarantees safe execution by multiple threads at the same time. There are various strategies for making thread-safe data structures.
A key challenge in multi-threaded programming, thread safety was not a concern for most application developers until the 1990s when operating systems began to expose multiple threads for code execution. Today, a program may execute code on several threads simultaneously in a shared address space where each of those threads has access to virtually all of the memory of every other thread. Thread safety is a property that allows code to run in multi-threaded environments by re-establishing some of the correspondences between the actual flow of control and the text of the program, by means of synchronization.
Read more about Thread Safety: Levels of Thread Safety, Implementation Approaches, Examples
Famous quotes containing the words thread and/or safety:
“Fate forces its way to the powerful and violent. With subservient obedience it will assume for years dependency on one individual: Caesar, Alexander, Napoleon, because it loves the elemental human being who grows to resemble it, the intangible element. Sometimes, and these are the most astonishing moments in world history, the thread of fate falls into the hands of a complete nobody but only for a twitching minute.”
—Stefan Zweig (18811942)
“For hours, in fall days, I watched the ducks cunningly tack and veer and hold the middle of the pond, far from the sportsman;... but what beside safety they got by sailing in the middle of Walden I do not know, unless they love its water for the same reason that I do.”
—Henry David Thoreau (18171862)