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

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
(Added dependencies.)
(Rephrased.)
Line 7: Line 7:
 
; Feature
 
; Feature
 
: The UNO Runtime provides support for implementing
 
: The UNO Runtime provides support for implementing
 +
:* [[Uno/Spec/Thread Free | Thread Free]], or
 
:* [[Uno/Spec/Thread Safe | Thread Safe]], or  
 
:* [[Uno/Spec/Thread Safe | Thread Safe]], or  
 
:* [[Uno/Spec/Thread Unsafe | Thread Unsafe]], or  
 
:* [[Uno/Spec/Thread Unsafe | Thread Unsafe]], or  
Line 16: Line 17:
 
; Rationale:
 
; Rationale:
  
−
; API
+
; API:
−
: The different threading models are accessible as [[Uno/Spec/Purpose Environment |Purpose Environments]].
+
; [[Uno/Spec/Purpose Environment | Purpose Environment]]: The different threading types are supported by using [[Uno/Spec/Purpose Environment |Purpose Environments]].
−
 
+
; [[Uno/Spec/Implementation Environment | Implementation Environment]]: The actual threading type can be selected in a [[Uno/Spec/Lanuage Binding | Language Binding]] typical way and is backed by the appropriate [[Uno/Spec/Protocol Bridge | Protocol Bridge]]. The used [[Uno/Spec/Protocol Bridge | Protocol Bridges]] are the
−
: The predefined purposes for objects are defined according to their threading type,
+
:* [[Uno/Spec/Thread Unsafety Bridge | Thread Unsafety Bridge]] for [[Uno/Spec/Thread Unsafe | Thread Unsafe]] code and the
−
:* <code>":unsafe"</code> - for [[Uno/Spec/Thread Unsafe | Thread Unsafe]] code,
+
:* [[Uno/Spec/Thread Affinity Bridge | Thread Affinty Bridge]]  for [[Uno/Spec/Thread Affine | Thread Affine]] code. [[Uno/Spec/Thread Safe | Thread Safe]] code does not need to be backed, as this is the default for plain code, these also preserves compatibility with previous UNO versions.
−
:* <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.
+
: Code may as well be declared [[Uno/Spec/Thread Free | Thread Free]], so that it may be used from any other kind of code.
 
:
 
:
−
: '''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.
+
; [[Uno/Spec/Environment Stack | Environment Stack]]: 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. An API for accessing the ''current'' environment is provided.
 
:
 
:
−
: Purpose environments may be passed to the [[Uno/Spec/Runtime | Runtime]] for accessing cascaded mappings (<code>"gcc3"</code> => <code>"java:mutex:debug"</code>).
+
; [[Uno/Spec/Cascaded Mapping|Cascaded Mapping]]: 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.
 
  
 
; Dependencies
 
; Dependencies
Line 37: Line 36:
 
:* [[Uno/Spec/Implementation Environment]]
 
:* [[Uno/Spec/Implementation Environment]]
 
:* [[Uno/Spec/Cascaded Mapping]]
 
:* [[Uno/Spec/Cascaded Mapping]]
−
:* [[Uno/Spec/Purpose Environment]]
 
 
:* [[Uno/Spec/Environment Substitution]]
 
:* [[Uno/Spec/Environment Substitution]]
  

Revision as of 16:21, 26 April 2006

version: 9120
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
Purpose Environment
The different threading types are supported by using Purpose Environments.
Implementation Environment
The actual threading type can be selected in a Language Binding typical way and is backed by the appropriate Protocol Bridge. The used Protocol Bridges are the
Code may as well be declared Thread Free, so that it may be used from any other kind of code.
Environment Stack
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. An API for accessing the current environment is provided.
Cascaded Mapping
Purpose environments may be passed to the Runtime for accessing cascaded mappings ("gcc3" => "java:mutex:debug").
Dependencies
Compatibility Issues
None.
Personal tools