Difference between revisions of "Uno/Spec/Thread Unsafety Bridge"
From Apache OpenOffice Wiki
m (Improved links.) |
m (Improved style.) |
||
Line 1: | Line 1: | ||
− | |||
state: draft <br> | state: draft <br> | ||
type: specification <br> | type: specification <br> | ||
Line 5: | Line 4: | ||
== Thread Unsafety Bridge == | == Thread Unsafety Bridge == | ||
− | + | === Feature === | |
− | + | This [[../Bridge|bridge]] protects [[Uno/Term/Thread Unsafe|thread unsafe]] objects from being called by multi threads simultaneously. It does this by acquring a dedicated mutex before actually doing the call. | |
− | + | A [[../Purpose Bridge|purpose bridge]] protecting [[Uno/Term/Thread Unsafe|thread unsafe]] objects: | |
− | + | * <code>enter</code>: Aquires the mutex of the associated [[../Environment|Environment]]. | |
− | + | * <code>leave</code>: Releases the mutex of the associated [[../Environment|Environment]]. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | * <code>callInto</code>: Acquires the mutex of the associated [[../Environment|Environment]] and calls the desired method. | |
+ | * <code>callOut </code>: Calls the desired method, while keeping the mutex of the associated [[../Environment|Environment]] acquired. | ||
− | + | === Rationale === | |
− | + | ||
− | + | === API === | |
− | :* [[../Environment Stack]] | + | [[../Purpose Bridge|Purpose bridge]] named <code>":unsafe"</code>. |
+ | |||
+ | === Dependencies === | ||
+ | * [[../Environment Stack]] | ||
[[Category:Uno:Spec]] | [[Category:Uno:Spec]] |
Revision as of 15:32, 16 June 2006
state: draft
type: specification
Thread Unsafety Bridge
Feature
This bridge protects thread unsafe objects from being called by multi threads simultaneously. It does this by acquring a dedicated mutex before actually doing the call.
A purpose bridge protecting thread unsafe objects:
-
enter
: Aquires the mutex of the associated Environment. -
leave
: Releases the mutex of the associated Environment.
-
callInto
: Acquires the mutex of the associated Environment and calls the desired method. -
callOut
: Calls the desired method, while keeping the mutex of the associated Environment acquired.
Rationale
API
Purpose bridge named ":unsafe"
.