Uno/Binary/Spec/Threading-Model
From Apache OpenOffice Wiki
version: 8228
state: draft
type: specification
Threading Model
- Feature
- 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:
-
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:
-
UNO_THREAD_SAFE
=>"<ABI>"
-
UNO_THREAD_UNSAFE
=>"<ABI>:unsafe"
-
UNO_THREAD_AFFINE
=>"<ABI>:affine"
, see Uno/Binary/Spec/Thread Affinity Bridge for details.
-
- Threading model specific environments are backed by the appropriate purpose environments.
-
"<ABI>:unsafe"
is backed by the default Uno/Binary/Spec/Thread Unsafety Bridge. -
"<ABI>"
is backed by the default thread safe environment (as usual). -
"<ABI>:thread"
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.
- 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.
- API Extensions
-
- Environment Guards
- Environment Aware References
- Environment Stacks
- Cascaded Mappings
- Purpose Environments
- Dependencies
-
- Environment Guards
- Environment Aware References
- Environment Stacks
- Cascaded Mappings
- Purpose Environments
- Compatibility Issues
-
- Environment Guards
- Environment Aware References
- Environment Stacks
- Cascaded Mappings
- Purpose Environments