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

From Apache OpenOffice Wiki
< Uno‎ | Binary
Jump to: navigation, search
m
(Fixed dependencies and API.)
Line 8: Line 8:
 
: 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. The following new defines select the threading type for binary UNO:
+
: Support threading type specific compilation via <code>#define</code>. Specify defines for the following threading types:
:* <code>UNO_THREAD_SAFE</code>
+
:* thread unsafe
:* <code>UNO_THREAD_UNSAFE</code>
+
:* thread safe
:* <code>UNO_THREAD_AFFINE</code>
+
:* thread affine
 +
:* thread free
 
:
 
:
: 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:
 
:* <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.
 
 
 
: Threading model specific environments are backed by the appropriate purpose environments.
 
: 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>:unsafe" </code> is backed by the default [[Uno/Binary/Spec/Thread Unsafety Bridge]].
Line 28: Line 22:
  
 
; Rationale
 
; Rationale
: The current threading related code quality of OOo has proven, the 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.
+
: 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 Extensions:
+
; API:
:* Environment Guards
+
:The following new defines select the threading type for binary UNO:
:* Environment Aware References
+
:* <code>UNO_THREAD_SAFE</code>
:* Environment Stacks
+
:* <code>UNO_THREAD_UNSAFE</code>
:* Cascaded Mappings
+
:* <code>UNO_THREAD_AFFINE</code>
:* 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.
 +
 
 +
: The Associated environments are:
 +
:* <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:
 
; 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 Guards
 
:* Environment Aware References
 
:* Environment Aware References
:* Environment Stacks
 
:* Cascaded Mappings
 
:* Purpose Environments
 
  
; Compatibility Issues:
+
; Compatibility Issues: None.
:* Environment Guards
+
:* Environment Aware References
+
:* Environment Stacks
+
:* Cascaded Mappings
+
:* Purpose Environments
+
  
 
[[Category:Uno:Binary:Spec]]
 
[[Category:Uno:Binary:Spec]]

Revision as of 14:30, 19 April 2006

version: 8568
state: draft
type: specification

Threading Model

Feature
The Uno/Spec/Threading Model for the Binary UNO runtime.
Support threading type specific compilation via #define. 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.
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
Compatibility Issues
None.
Personal tools