Levels of Thread Safety
Software libraries can provide certain thread-safety guarantees. For example, concurrent reads might be guaranteed to be thread-safe, but concurrent writes might not be. Whether or not a program using such a library is thread-safe depends on whether it uses the library in a manner consistent with those guarantees.
Different vendors use slightly different terminology for thread-safety:
- Thread safe: Implementation is guaranteed to be free of race conditions when accessed by multiple threads simultaneously.
- Conditionally safe: Different threads can access different objects simultaneously, and access to shared data is protected from race conditions.
- Not thread safe: Code should not be accessed simultaneously by different threads.
Thread safety guarantees usually also include design steps to prevent or limit the risk of different forms of deadlocks, as well as optimizations to maximize concurrent performance. However, deadlock-free guarantees can not always be given, since deadlocks can be caused by callbacks and violation of architectural layering independent of the library itself.
Read more about this topic: Thread Safety
Famous quotes containing the words levels of, levels, thread and/or safety:
“The country is fed up with children and their problems. For the first time in history, the differences in outlook between people raising children and those who are not are beginning to assume some political significance. This difference is already a part of the conflicts in local school politics. It may spread to other levels of government. Society has less time for the concerns of those who raise the young or try to teach them.”
—Joseph Featherstone (20th century)
“Pushkins composition is first of all and above all a phenomenon of style, and it is from this flowered rim that I have surveyed its seep of Arcadian country, the serpentine gleam of its imported brooks, the miniature blizzards imprisoned in round crystal, and the many-hued levels of literary parody blending in the melting distance.”
—Vladimir Nabokov (18991977)
“First you find a little thread, a little thread leads you to a string, and the string leads you to a rope. And from the rope you hang by the ... neck.”
—A.I. (Albert Isaac)
“Perhaps in a book review it is not out of place to note that the safety of the state depends on cultivating the imagination.”
—Stephen Vizinczey (b. 1933)