Uno/Binary/Spec/Threading-Model
From Apache OpenOffice Wiki
author: Kr
version: 5789
state: draft
created: 01/10/2006
changed: 01/10/2006
type: specification
Binary UNO
Threading Model
- Goal
- Integrate threading models into the Binary UNO runtime.
- Feature A
- Support thread model specific compilation. The following new defines select the UNO threading model for binary UNO:
* CPPU_THREAD_SAFE * CPPU_THREAD_UNSAFE * CPPU_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.
Associated environments are:
- CPPU_THREAD_SAFE => <BU-LB>[:null]
- CPPU_THREAD_UNSAFE => <BU-LB>:mutex
- CPPU_THREAD_AFFINE => <BU-LB>:thread
(<BU-LB> stands for any binary UNO language binding (e.g. various C/C++))
Purpose Environments
Threading model specific environments are backed by the appropriate purpose environments.
- <BU-LB>:mutex environments are backed by the default mutex apartment
- <BU-LB>[:null] environments are backed by the default free apartment
- <BU-LB>:thread environments are backed by the default thread apartment
Feature:
- Environment Guards
- Environment Aware References
- Environment Stacks
- Cascaded Mappings
- Purpose Environments
Dependencies:
- Environment Guards
- Environment Aware References
- Environment Stacks
- Cascaded Mappings
- Purpose Environments
Changes:
- Environment Guards
- Environment Aware References
- Environment Stacks
- Cascaded Mappings
- Purpose Environments
API Extensions:
- Environment Guards
- Environment Aware References
- Environment Stacks
- Cascaded Mappings
- Purpose Environments
Compatibility Issues:
- Environment Guards
- Environment Aware References
- Environment Stacks
- Cascaded Mappings
- Purpose Environments