Difference between revisions of "Uno/Term/Thread Safe"

From Apache OpenOffice Wiki
< Uno‎ | Term
Jump to: navigation, search
m (Uno/Spec/Thread Safe moved to Uno/Term/Thread Safe: It is not a spec, but a term.)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
; Thread Safe Code
+
; Thread Safe: Code is thread-safe, if it can safely be called concurrently by multiple threads. This typically means, that it protects critical sections by locks. Thread-safe code is [[Uno/Term/Thread Aware|thread-aware]]. [[Wikipedia:|Wikipedia]] has a more in-deep article about [[Wikipedia:Thread safety|thread safety]].
: Thread safe code takes care of all threading issues, including locking critical sections etc. Code doing blocking I/O needs to be thread safe, so that system calls can be interrupted. Thread safe code may also be used to allow high concurrency, while avoiding the runtime overhead of external locking.
+
 
 +
In [[Uno]], components need to be declared thread-safe, if doing blocking I/O, so that the components system calls can be interrupted. Thread-safe components may also be used to allow high concurrency, while avoiding the runtime overhead of external locking.
 +
 
 +
[[Category:Uno]]
 +
[[Category:Term]]
 +
[[Category:Multi-Threading]]

Latest revision as of 07:20, 19 June 2007

Thread Safe
Code is thread-safe, if it can safely be called concurrently by multiple threads. This typically means, that it protects critical sections by locks. Thread-safe code is thread-aware. Wikipedia has a more in-deep article about thread safety.

In Uno, components need to be declared thread-safe, if doing blocking I/O, so that the components system calls can be interrupted. Thread-safe components may also be used to allow high concurrency, while avoiding the runtime overhead of external locking.

Personal tools