Thread Safety

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:

    I often wish for the end of the wretched remnant of my life; and that wish is a rational one; but then the innate principle of self-preservation, wisely implanted in our natures, for obvious purposes, opposes that wish, and makes us endeavour to spin out our thread as long as we can, however decayed and rotten it may be.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)

    An evident principle ... is the principle of justice to all peoples and nationalities, and their right to live on equal terms of liberty and safety with one another, whether they be strong or weak.
    Woodrow Wilson (1856–1924)