Difference between revisions of "Uno/Spec/Thread Unsafety Bridge"

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
m (API: Typo.)
(Removed implementation assumptions.)
Line 5: Line 5:
  
 
=== Feature ===
 
=== Feature ===
This [[../Bridge|bridge]] protects [[Uno/Term/Thread Unsafe|thread unsafe]] objects from being called by multiple threads concurrently. It does this by acquring a dedicated mutex before actually doing the call.
+
This [[../Bridge|bridge]] protects [[Uno/Term/Thread Unsafe|thread unsafe]] objects from being called by multiple threads concurrently.  
  
The purpose bridges behaves as follows,
+
Only one thread at a time can enter a Unsafety Environment, an Unsafety Environment is entered, if any thread has one of the methods provided by the <code>Enterable</code> API on the stack.
* entering the Unsafety Environment aquires the associated mutex, in case the mutex has already been acquired, the calling thread blocks until it has been released,
+
* leaveing the Unsafety Environment releases the associated mutex,  
+
* calling into the Unsafey Environment, leads to the invocation of the passed function, after acquiring the associated mutex,
+
* calling out of the Unsafety Environment, leads to the invocation of the passed function, actually keeping the associated mutex acquired, therefor protecting any objects on the callers stack.
+
 
+
=== Rationale ===
+
  
 
=== API ===
 
=== API ===

Revision as of 12:41, 28 June 2006

state: draft
type: specification

Thread Unsafety Bridge

Feature

This bridge protects thread unsafe objects from being called by multiple threads concurrently.

Only one thread at a time can enter a Unsafety Environment, an Unsafety Environment is entered, if any thread has one of the methods provided by the Enterable API on the stack.

API

Purpose bridge named "unsafe".

Dependencies

Personal tools