Uno/Binary/Spec/Threading-Model

From Apache OpenOffice Wiki
< Uno‎ | Binary
Revision as of 14:30, 19 April 2006 by Kr (talk | contribs) (Fixed dependencies and API.)
Jump to: navigation, search

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