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

From Apache OpenOffice Wiki
< Uno‎ | Binary
Jump to: navigation, search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
author[[User:Kr|Kr]]    <br>
+
Type: Implementation State: Finished Availability: URE 1.3 (SRC680_m212)
version: {{REVISIONID}}    <br>
+
state:  UTF2              <br>
+
created: 01/17/2006        <br>
+
type:   impl. description <br>
+
  
== Binary UNO ==
+
Implementation of [[../../Spec/Thread Affinity Bridge]].
=== Thread Purpose Environment ===
+
  
;Headers: None.
+
==Description==
 +
The Thread Affinity Bridge ensures that [[../Thread Affine|thread affine]] objects are always called by the same thread.  
  
;Link Libraries : None.
+
It does this by using a private thread, to which it switches prior actually invoking a particular object. This private thread is therefore the thread objects may create an [[Uno/Term/Thread Affine|affinity]] to. The [[Uno/Term/Thread Affine|affinity]] also switches back to the originator thread, in case an object tries to call out, this ensures [[Uno/Term/Thread Transparent|thread transparency]].
  
;Purpose Bridge: thread_uno_uno
+
The Affinity Bridge behaves as follows,
 +
* entering a Thread Affine environment associates the current thread with it, in case the environment already has a thread associated, the enter blocks until no object is registered any more,
 +
* leaving a Thread Affine environment disassociates the current thread from the [[Uno/Spec/Environment|Environment]], in case objects are still mapped, the leave blocks until no object is registered any more,
 +
* calling into the Thread Affinity environment, leads to the invocation of the passed function by the associated thread,
 +
* calling out of the Thread Affinity environment, leads to the invocation of the passed function by the in-calling thread, in case of no in-calling thread, the associated thread calls out directly.
  
;Known Issues : None.
+
==Files==
 +
* {{Uno/UDKlink|cppu/source/AffineBridge/ThreadEnvironment.cxx}}
 +
* {{Uno/UDKlink|cppu/source/AffineBridge/makefile.mk}}
  
;Dependencies:
+
==Tests==
:* Stacked Environments
+
* [[../../Test/Thread Affinity Bridge]]
:* Binary UNO
+
:* Purpose Environment Implementation Helper
+
  
; Files:
+
==Dependencies==
:* cppu/source/ThreadEnvironment/ThreadEnvironment.cxx -r1.1.2.1
+
* [[../Environment Stack]]
:* cppu/source/ThreadEnvironment/makefile.mk          -r1.1.2.1
+
* [[../Runtime]]
:* cppu/prj/d.lst                                      -r1.15.2.5
+
* [[Uno/Cpp/Spec/Purpose Bridge Implementation Helper]]
 +
 
 +
 
 +
[[Category:Impl]]
 +
[[Category:Module:CPPU]]
 +
[[Category:Uno]]
 +
[[Category:Uno:Binary]]
 +
[[Category:Multi-Threading]]

Latest revision as of 07:22, 19 June 2007

Type: Implementation State: Finished Availability: URE 1.3 (SRC680_m212)

Implementation of Uno/Binary/Spec/Thread Affinity Bridge.

Description

The Thread Affinity Bridge ensures that thread affine objects are always called by the same thread.

It does this by using a private thread, to which it switches prior actually invoking a particular object. This private thread is therefore the thread objects may create an affinity to. The affinity also switches back to the originator thread, in case an object tries to call out, this ensures thread transparency.

The Affinity Bridge behaves as follows,

  • entering a Thread Affine environment associates the current thread with it, in case the environment already has a thread associated, the enter blocks until no object is registered any more,
  • leaving a Thread Affine environment disassociates the current thread from the Environment, in case objects are still mapped, the leave blocks until no object is registered any more,
  • calling into the Thread Affinity environment, leads to the invocation of the passed function by the associated thread,
  • calling out of the Thread Affinity environment, leads to the invocation of the passed function by the in-calling thread, in case of no in-calling thread, the associated thread calls out directly.

Files

Tests

Dependencies

Personal tools