Difference between revisions of "Uno/Binary/Spec/Thread Affinity Bridge"

From Apache OpenOffice Wiki
< Uno‎ | Binary
Jump to: navigation, search
m (Wording, typos.)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
version: {{REVISIONID}} <br>
+
Type: Specification  State: Evolving Availability: URE 1.3 (SRC680_m212)
state:   draft          <br>
+
type:    specification <br>
+
  
== Thread Affine Environment ==
+
The [[Uno/Spec/Thread Affinity Bridge]] for [[Uno/Binary|Binary Uno]].
  
; Description
+
==API==
: The Thread Affine Environment protects [[Uno/Spec/Thread Affine|Thread Affine]] objects from being called by wrong threads. It does this by providing a dedicated thread, into which it delegates the calls prior to invocation. This dedicated thread is therefor the thread objects create any affinity to.
+
A [[Uno/Spec/Purpose Bridge]] named
 +
<code>"affine_uno_uno"</code>
  
; Feature:
+
==Dependencies==
: A purpose environment protecting [[Uno/Spec/Thread Affine|Thread Affine]] objects:
+
* [[Uno/Spec/Environment Stack]]
: - <code>enter</code>: Associates the current thread with the environment
+
* [[Uno/Spec/Thread Affinity Bridge]]
: - <code>leave</code>: In case no objects are mapped it disassociates the current thread with the environment, in case objects are mapped and this is the last <code>leave</code>, it blocks until no object is mapped anymore.
+
:
+
: - <code>callInto</code>: Calls the desired method from the associated thread.
+
: - <code>callOut </code>:  Calls the desired method from the outer thread, if there is no outer thread yet, the associated thread is used.
+
  
; Rationale
 
: Some APIs have thread affinities in respect to particular handles they return. For example, on Win32 the window-destroy and -message functions require to be called by the same thread which actually created the window. This thread affinity is inherited when developing APIs on top of these thread affine APIs.
 
: In general, thread affine APIs are hard to program, especially in generic frameworks where it is not knowable before hand how long a thread lives and on whichs objects it calls.
 
  
; API
+
[[Category:Draft]]
 
+
[[Category:Spec]]
; Compatibility Issues: None.
+
[[Category:Uno]]
 
+
[[Category:Uno:Binary]]
; Dependencies:
+
[[Category:Multi-Threading]]
:* EnvStack
+
 
+
[[Category:Uno:Binary:Spec]]
+

Latest revision as of 07:25, 19 June 2007

Type: Specification State: Evolving Availability: URE 1.3 (SRC680_m212)

The Uno/Spec/Thread Affinity Bridge for Binary Uno.

API

A Uno/Spec/Purpose Bridge named

"affine_uno_uno"

Dependencies

Personal tools