Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>from wikipedia :</p> <p><em>Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads. In particular, it must satisfy the need for multiple threads to access the same shared data, and the need for a shared piece of data to be accessed by only one thread at any given time.</em></p> <p>...</p> <p><em>There are a few ways to achieve thread safety:</em></p> <p><strong>Re-entrancy</strong> </p> <p><em>Writing code in such a way that it can be partially executed by one task, reentered by another task, and then resumed from the original task. This requires the saving of state information in variables local to each task, usually on its stack, instead of in static or global variables.</em></p> <p><strong>Mutual exclusion</strong> </p> <p><em>Access to shared data is serialized using mechanisms that ensure only one thread reads or writes the shared data at any time. Great care is required if a piece of code accesses multiple shared pieces of data—problems include race conditions, deadlocks, livelocks, starvation, and various other ills enumerated in many operating systems textbooks.</em></p> <p><strong>Thread-local storage</strong> </p> <p><em>Variables are localized so that each thread has its own private copy. These variables retain their values across subroutine and other code boundaries, and are thread-safe since they are local to each thread, even though the code which accesses them might be reentrant.</em></p> <p><strong>Atomic operations</strong> </p> <p><em>Shared data are accessed by using atomic operations which cannot be interrupted by other threads. This usually requires using special machine language instructions, which might be available in a runtime library. Since the operations are atomic, the shared data are always kept in a valid state, no matter what other threads access it. Atomic operations form the basis of many thread locking mechanisms.</em> </p> <p><strong>read more :</strong></p> <p><a href="http://en.wikipedia.org/wiki/Thread_safety" rel="noreferrer">http://en.wikipedia.org/wiki/Thread_safety</a></p> <hr> <ul> <li><p>in german : <a href="http://de.wikipedia.org/wiki/Threadsicherheit" rel="noreferrer">http://de.wikipedia.org/wiki/Threadsicherheit</a></p></li> <li><p>in french : <a href="http://fr.wikipedia.org/wiki/Threadsafe" rel="noreferrer">http://fr.wikipedia.org/wiki/Threadsafe</a> (very short)</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload