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

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
(The generic UNO threading model.)
Line 1: Line 1:
author:  [[User:Kr|Kr]] <br>
 
 
version: {{REVISIONID}} <br>
 
version: {{REVISIONID}} <br>
 
state:  draft          <br>
 
state:  draft          <br>
created: 12/12/2005    <br>
 
 
type:    specification  <br>
 
type:    specification  <br>
  
Line 20: Line 18:
  
 
; API
 
; 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 different threading models are accessible as [[Uno/Spec/Purpose Environment |Purpose Environments]].
 
+
: 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.
+
  
 +
: The predefined purposes for objects are defined according to their threading type,
 +
:* <code>":unsafe"</code> - for [[Uno/Spec/Thread Unsafe | Thread Unsafe]] code,
 +
:* <code>":affine"</code> - for [[Uno/Spec/Thread Affine | Thread Affine]] code, and
 +
:* <code>""      </code> - for [[Uno/Spec/Thread Safe  | 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.
 
: '''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>).
+
: Purpose environments may be passed to the [[Uno/Spec/Runtime | Runtime]] for accessing 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.
 
: '''Implementation Environments:''' Client code as well as service code may be declared once, to either be thread safe, thread affine or thread unsafe.
  
 
; Dependencies
 
; Dependencies
: [[Thread Environment]]
+
: [[Uno/Spec/Thread Affine Environment]]
: [[Mutex Environment]]
+
: [[Uno/Spec/Thread Unsafe Environment]]
: [[Cascaded Mapping]]
+
: [[Uno/Spec/Purpose Environment]]
  
 
; Compatibility Issues: None.
 
; Compatibility Issues: None.
  
 
[[Category:Uno:Spec]]
 
[[Category:Uno:Spec]]

Revision as of 11:14, 18 April 2006

version: 8180
state: draft
type: specification


UNO Threading Model

Feature
The UNO Runtime provides support for implementing
Code.
The threading type of any code can be specified appropriately. The Thread Unsafe type is the default type for any implementation.
Rationale
API
The different threading models are accessible as Purpose Environments.
The predefined purposes for objects are defined according to their threading type,
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.
Purpose environments may be passed to the Runtime for accessing cascaded mappings ("gcc3" => "java:mutex:debug").
Implementation Environments: Client code as well as service code may be declared once, to either be thread safe, thread affine or thread unsafe.
Dependencies
Uno/Spec/Thread Affine Environment
Uno/Spec/Thread Unsafe Environment
Uno/Spec/Purpose Environment
Compatibility Issues
None.
Personal tools