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

From Apache OpenOffice Wiki
< Uno‎ | Binary
Jump to: navigation, search
(Fixed dependencies and API.)
m (Changed layout.)
Line 1: Line 1:
version: {{REVISIONID}} <br>
+
State:  draft          <br>
state:  draft          <br>
+
Type:    specification  <br>
type:    specification  <br>
+
  
== Threading Model ==
+
==Threading Model==
  
;Feature
+
===Description===
: The [[Uno/Spec/Threading Model]] for the Binary UNO runtime.
+
The [[Uno/Spec/Threading Model]] for the Binary UNO runtime.
:
+
: Support threading type specific compilation via <code>#define</code>. Specify defines for the following threading types:
+
:* thread unsafe
+
:* thread safe
+
:* thread affine
+
:* thread free
+
:
+
: Threading model specific environments are backed by the appropriate purpose environments.
+
:* <code>"<ABI>:unsafe" </code> is backed by the default [[Uno/Binary/Spec/Thread Unsafety Bridge]].
+
:* <code>"<ABI>"      </code> is backed by the default thread safe environment (as usual).
+
:* <code>"<ABI>:thread"</code> is backed by the default is backed by the default [[Uno/Binary/Spec/Thread Affinity Bridge]].
+
  
: The UNO Threading Model specification for Binary UNO is the sum of the specifications for the parts, see below for details.
+
Support threading type specific compilation via <code>#define</code>. Specify defines for the following threading types:
 +
* [[Uno/Term/Thread Unsafe|thread unsafe]]
 +
* [[Uno/Term/Thread Safe|thread safe]]
 +
* [[Uno/Term/Thread Affine|thread affine]]
 +
* [[Uno/Term/Thread Free|thread free]]
  
; Rationale
+
Threading model specific environments are backed by the appropriate purpose environments.
: The current threading related code quality of OOo has proven that doing proper multi threading programming is not easy. Even seemingly simple things, as thread safeness, seem to be unreachable. Therefor UNO programming must be as simple as possible in respect to multi threading programming.
+
* <code>"<ABI>:unsafe" </code> is backed by the default [[Uno/Binary/Spec/Thread Unsafety Bridge]].
 +
* <code>"<ABI>"      </code> is backed by the default thread safe environment (as usual).
 +
* <code>"<ABI>:affine"</code> is backed by the default [[Uno/Binary/Spec/Thread Affinity Bridge]].
  
; API:
+
The UNO Threading Model specification for Binary UNO is the sum of the specifications for the parts, see below for details.
:The following new defines select the threading type for binary UNO:
+
:* <code>UNO_THREAD_SAFE</code>
+
:* <code>UNO_THREAD_UNSAFE</code>
+
:* <code>UNO_THREAD_AFFINE</code>
+
:
+
:Services / Client code compiled with one of these defines lifes in the associated environment. Not defining one of these defines, lets binary UNO fall back to <code>CPPU_THREAD_SAFE</code>, and gives a warning. This is compatible with the original behaviour.
+
  
: The Associated environments are:
+
===Rationale===
:* <code>UNO_THREAD_SAFE  </code> => <code>"<ABI>"</code>
+
The current threading related code quality of OOo has proven that doing proper multi threading programming is not easy. Even seemingly simple things, as thread safeness, seem to be unreachable. Therefor UNO programming must be as simple as possible in respect to multi threading programming.
:* <code>UNO_THREAD_UNSAFE</code> => <code>"<ABI>:unsafe"</code>
+
:* <code>UNO_THREAD_AFFINE</code> => <code>"<ABI>:affine"</code>, see [[Uno/Binary/Spec/Thread Affinity Bridge]] for details.
+
  
; Dependencies:
+
===API===
:* [[Uno/Binary/Spec/Thread Unsafety Bridge]]
+
The following new defines select the threading type for binary UNO:
:* [[Uno/Binary/Spec/Thread Affinity Bridge]]
+
* <code>UNO_THREAD_SAFE</code>
:* [[Uno/Binary/Spec/Implementation Environment]]
+
* <code>UNO_THREAD_UNSAFE</code>
:* [[Uno/Binary/Spec/Environment Stack]]
+
* <code>UNO_THREAD_AFFINE</code>
:* [[Uno/Binary/Spec/Cascaded Mapping]]
+
 
:* [[Uno/Binary/Spec/Purpose Environments]]
+
Services / Client code compiled with one of these defines lifes in the associated environment. Not defining one of these defines, lets binary UNO fall back to <code>CPPU_THREAD_SAFE</code>, and gives a warning. This is compatible with the original behaviour.
:* [[Uno/Binary/Spec/Environment Substitution]]
+
 
:* Environment Guards
+
The Associated environments are:
:* Environment Aware References
+
* <code>UNO_THREAD_SAFE  </code> => <code>"<ABI>"</code>
 +
* <code>UNO_THREAD_UNSAFE</code> => <code>"<ABI>:unsafe"</code>
 +
* <code>UNO_THREAD_AFFINE</code> => <code>"<ABI>:affine"</code>, see [[Uno/Binary/Spec/Thread Affinity Bridge]] for details.
 +
 
 +
===Dependencies===
 +
* [[Uno/Binary/Spec/Thread Unsafety Bridge]]
 +
* [[Uno/Binary/Spec/Thread Affinity Bridge]]
 +
* [[Uno/Binary/Spec/Implementation Environment]]
 +
* [[Uno/Binary/Spec/Environment Stack]]
 +
* [[Uno/Binary/Spec/Cascaded Mapping]]
 +
* [[Uno/Binary/Spec/Purpose Environments]]
 +
* [[Uno/Binary/Spec/Environment Substitution]]
 +
* Environment Guards
 +
* Environment Aware References
  
; Compatibility Issues: None.
 
  
 
[[Category:Uno:Binary:Spec]]
 
[[Category:Uno:Binary:Spec]]
 +
[[Category:draft]]

Revision as of 10:04, 10 July 2006

State: draft
Type: specification

Threading Model

Description

The Uno/Spec/Threading Model for the Binary UNO runtime.

Support threading type specific compilation via #define. Specify defines for the following threading types:

Threading model specific environments are backed by the appropriate purpose environments.

The UNO Threading Model specification for Binary UNO is the sum of the specifications for the parts, see below for details.

Rationale

The current threading related code quality of OOo has proven that doing proper multi threading programming is not easy. Even seemingly simple things, as thread safeness, seem to be unreachable. Therefor UNO programming must be as simple as possible in respect to multi threading programming.

API

The following new defines select the threading type for binary UNO:

  • UNO_THREAD_SAFE
  • UNO_THREAD_UNSAFE
  • UNO_THREAD_AFFINE

Services / Client code compiled with one of these defines lifes in the associated environment. Not defining one of these defines, lets binary UNO fall back to CPPU_THREAD_SAFE, and gives a warning. This is compatible with the original behaviour.

The Associated environments are:

Dependencies

Personal tools