Uno/Spec/Thread Unsafety Bridge
From Apache OpenOffice Wiki
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"
.