Uno/Spec/Threading-Model
From Apache OpenOffice Wiki
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.