Difference between revisions of "Uno/Binary/Spec/Threading-Model"
(→Description: Removed "thread free".) |
m (Fixed section indentation, some wording, adapted links.) |
||
Line 1: | Line 1: | ||
− | + | Type: Specification State: draft | |
− | Type: | + | |
− | == | + | ==Description== |
+ | The refined specification of the [[Uno/Spec/Threading Model|abstract threading-model]] for the [[Uno/Binary|Binary Uno]] runtime. | ||
− | + | Support threading type specific compilation via <code>#define</code>. Specify defines for the following threading types, | |
− | + | * [[Uno/Term/Thread Unsafe|thread-unsafe]], | |
− | + | * [[Uno/Term/Thread Safe|thread-safe]], and | |
− | Support threading type specific compilation via <code>#define</code>. Specify defines for the following threading types | + | * [[Uno/Term/Thread Affine|thread-affine]]. |
− | * [[Uno/Term/Thread Unsafe|thread unsafe]] | + | |
− | * [[Uno/Term/Thread Safe|thread safe]] | + | |
− | * [[Uno/Term/Thread Affine|thread affine]] | + | |
Threading model specific environments are backed by the appropriate purpose environments. | Threading model specific environments are backed by the appropriate purpose environments. | ||
− | * <code>"< | + | * <code>"<OBI>:unsafe" </code> is backed by the default [[Uno/Binary/Spec/Thread Unsafety Bridge]]. |
− | * <code>"< | + | * <code>"<OBI>" </code> is backed by the default thread-safe environment (as usual). |
− | * <code>"< | + | * <code>"<OBI>:affine"</code> is backed by the default [[Uno/Binary/Spec/Thread Affinity Bridge]]. |
− | The | + | The [[Uno/Term/Threading-Model|threading-model]] specification for [[Uno/Binary|Binary Uno]] is the sum of the specifications of 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 | + | 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 | + | The following new defines select the threading type for [[Uno/Binary|Binary Uno]]: |
* <code>UNO_THREAD_SAFE</code> | * <code>UNO_THREAD_SAFE</code> | ||
* <code>UNO_THREAD_UNSAFE</code> | * <code>UNO_THREAD_UNSAFE</code> | ||
Line 31: | Line 28: | ||
The Associated environments are: | The Associated environments are: | ||
− | * <code>UNO_THREAD_SAFE </code> => <code>"< | + | * <code>UNO_THREAD_SAFE </code> => <code>"<OBI>"</code> |
− | * <code>UNO_THREAD_UNSAFE</code> => <code>"< | + | * <code>UNO_THREAD_UNSAFE</code> => <code>"<OBI>:unsafe"</code> |
− | * <code>UNO_THREAD_AFFINE</code> => <code>"< | + | * <code>UNO_THREAD_AFFINE</code> => <code>"<OBI>:affine"</code>, see [[Uno/Binary/Spec/Thread Affinity Bridge]] for details. |
− | + | ==Dependencies== | |
* [[Uno/Binary/Spec/Thread Unsafety Bridge]] | * [[Uno/Binary/Spec/Thread Unsafety Bridge]] | ||
* [[Uno/Binary/Spec/Thread Affinity Bridge]] | * [[Uno/Binary/Spec/Thread Affinity Bridge]] |
Revision as of 08:37, 5 September 2006
Type: Specification State: draft
Contents
Description
The refined specification of the abstract threading-model for the Binary Uno runtime.
Support threading type specific compilation via #define
. Specify defines for the following threading types,
Threading model specific environments are backed by the appropriate purpose environments.
-
"<OBI>:unsafe"
is backed by the default Uno/Binary/Spec/Thread Unsafety Bridge. -
"<OBI>"
is backed by the default thread-safe environment (as usual). -
"<OBI>:affine"
is backed by the default Uno/Binary/Spec/Thread Affinity Bridge.
The threading-model specification for Binary Uno is the sum of the specifications of 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:
-
UNO_THREAD_SAFE
=>"<OBI>"
-
UNO_THREAD_UNSAFE
=>"<OBI>:unsafe"
-
UNO_THREAD_AFFINE
=>"<OBI>:affine"
, see Uno/Binary/Spec/Thread Affinity Bridge for details.