Difference between revisions of "Uno/Spec/Threading-Model"

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
m (Added category: Multi-Threading .)
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
author[[User:Kr|Kr]] <br>
+
Type: Specification State: draft Claim: optional
version: {{REVISIONID}} <br>
+
state:  draft         <br>
+
created: 12/12/2005    <br>
+
type:    specification  <br>
+
  
 +
==Feature==
 +
The [[../Runtime|Runtime]] provides dedicated support for implementing and handling
 +
* [[Uno/Term/Thread Safe|thread-safe]],
 +
* [[Uno/Term/Thread Unsafe|thread-unsafe]], and
 +
* [[Uno/Term/Thread Affine|thread-affine]]
 +
objects. The threading type of any code can be specified appropriately.
  
== UNO Threading Model ==
+
==Rationale==
 +
The [[Analysis/Multi-Threading| analysis of multi-threading]] shows OOo deficiencies wrt to multi-threading and [[Uno/Term/Thread Safe|thread-safeness]]. The [[Architecture/Goals for OOo Threading-Model&-Architecture|goals for the OOo Threading-Model & -Architecture]] identify three thread related types of code, which ([[Uno/Term/Thread Unsafe|thread-unsafe]], [[Uno/Term/Thread Safe|thread-safe]] and [[Uno/Term/Thread Affine|thread-affine]]).
  
; Feature
+
==API==
: The UNO Runtime provides support for implementing
+
Two thread related purposes:
:* [[Uno/Spec/Thread Safe | Thread Safe]], or
+
* <code>":unsafe"</code> - for [[Uno/Term/Thread Unsafe|thread-unsafe]] code.
:* [[Uno/Spec/Thread Unsafe | Thread Unsafe]], or
+
* <code>":affine"</code> - for [[Uno/Term/Thread Affine|thread-affine]] code.
:* [[Uno/Spec/Thread Affine | Thread Affine]]
+
: Code.
+
  
: The threading type of any code can be specified appropriately. The [[Uno/Spec/Thread Unsafe | Thread Unsafe]] type is the default type for any implementation.
+
==Dependencies==
 +
* [[Uno/Spec/Thread Affinity Bridge]]
 +
* [[Uno/Spec/Thread Unsafety Bridge]]
 +
* [[Uno/Spec/Purpose Environment]]
 +
* [[Uno/Spec/Environment Stack]]
 +
* [[Uno/Spec/Cascaded Mapping]]
 +
* [[Uno/Spec/Environment Substitution]]
  
; Rationale:
 
 
; API
 
: '''Purpose UNO Environments:''' The different threading models are accessible as standard UNO environments (CPP: uno/environment.h). Environment specifications (e.g. <code>"gcc3"</code>, <code>"java"</code>) are extended by "purpose" specifiers (e.g. <code>":mutex"</code>, <code>":thread"</code>), purpose specifiers may be chained (e.g. <code>":mutex:debug:test"</code>).
 
 
: The predefined purposes to objects according to their threading type are
 
:* <code>":mutex" </code> - for thread unsafe code,
 
:* <code>":thread"</code> - for thread affine code, and
 
:* <code>""      </code> - for thread safe code, to ensure compatibility with previous UNO versions.
 
 
: '''Stacked Environments:''' The current (purpose) environment does not only vary with the implementation language (e.g. Java or C++), but also with the executed codes declared threading type. Therefor an API for accessing the ''current'' environment is provided.
 
 
: '''Cascaded Mappings:''' Purpose environments may be passed to the Runtime for getting cascaded mappings (<code>"gcc3"</code> => <code>"java:mutex:debug"</code>).
 
 
: '''Implementation Environments:''' Client code as well as service code may be declared once, to either be thread safe, thread affine or thread unsafe.
 
 
; Dependencies
 
: [[Thread Environment]]
 
: [[Mutex Environment]]
 
: [[Cascaded Mapping]]
 
 
; Compatibility Issues: None.
 
  
 +
[[Category:Draft]]
 +
[[Category:Spec]]
 +
[[Category:Uno]]
 
[[Category:Uno:Spec]]
 
[[Category:Uno:Spec]]
 +
[[Category:Multi-Threading]]

Latest revision as of 07:08, 19 June 2007

Type: Specification State: draft Claim: optional

Feature

The Runtime provides dedicated support for implementing and handling

objects. The threading type of any code can be specified appropriately.

Rationale

The analysis of multi-threading shows OOo deficiencies wrt to multi-threading and thread-safeness. The goals for the OOo Threading-Model & -Architecture identify three thread related types of code, which (thread-unsafe, thread-safe and thread-affine).

API

Two thread related purposes:

Dependencies

Personal tools