Difference between revisions of "Uno/Spec/Threading-Model"
From Apache OpenOffice Wiki
(The generic UNO threading model.) |
|||
| Line 1: | Line 1: | ||
| − | |||
version: {{REVISIONID}} <br> | version: {{REVISIONID}} <br> | ||
state: draft <br> | state: draft <br> | ||
| − | |||
type: specification <br> | type: specification <br> | ||
| Line 20: | Line 18: | ||
; API | ; API | ||
| − | : | + | : The different threading models are accessible as [[Uno/Spec/Purpose Environment |Purpose Environments]]. |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | : 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. | ||
| − | + | : | |
| − | : | + | : 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]] |
| − | : [[ | + | : [[Uno/Spec/Thread Unsafe Environment]] |
| − | : [[ | + | : [[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
- Thread Safe, or
- Thread Unsafe, or
- Thread Affine
- 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,
":unsafe"- for Thread Unsafe code,":affine"- for Thread Affine code, and""- 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.
- 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.