Difference between revisions of "Uno/Spec/Thread Unsafety Bridge"
From Apache OpenOffice Wiki
m (→Feature: Rephrased.) |
m (→API: Typo.) |
||
Line 16: | Line 16: | ||
=== API === | === API === | ||
− | [[../Purpose Bridge|Purpose bridge]] named <code>" | + | [[../Purpose Bridge|Purpose bridge]] named <code>"unsafe"</code>. |
=== Dependencies === | === Dependencies === |
Revision as of 15:37, 16 June 2006
state: draft
type: specification
Thread Unsafety Bridge
Feature
This bridge protects thread unsafe objects from being called by multiple threads concurrently. It does this by acquring a dedicated mutex before actually doing the call.
The purpose bridges behaves as follows,
- 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
Purpose bridge named "unsafe"
.