Difference between revisions of "Uno/Spec/Threading-Architecture"

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
(Uno Threading-Architecture specification.)
 
m (API)
Line 5: Line 5:
  
 
==API==
 
==API==
* When implementing fast code, use threads for accessing slow APIs. Do notify about completion asynchronously.
+
* When implementing fast APIs, use threads for accessing slow APIs. Do notify about completion asynchronously.
 
* Be conservative, only program thread related / [[Uno/Term/Thread Aware|aware]] where necessary.
 
* Be conservative, only program thread related / [[Uno/Term/Thread Aware|aware]] where necessary.
 
* Implement public APIs etc. as wide as the parameters (e.g. always return appropriate purpose objects in case of [[Uno/Term/Object Binary Interface|OBI]] specialization)
 
* Implement public APIs etc. as wide as the parameters (e.g. always return appropriate purpose objects in case of [[Uno/Term/Object Binary Interface|OBI]] specialization)

Revision as of 14:28, 6 September 2006

Type: Specification State: draft

Feature

Concretely specify when to use which thread related construct.

API

  • When implementing fast APIs, use threads for accessing slow APIs. Do notify about completion asynchronously.
  • Be conservative, only program thread related / aware where necessary.
  • Implement public APIs etc. as wide as the parameters (e.g. always return appropriate purpose objects in case of OBI specialization)
  • Implement public APIs thread-transparent.
  • Only program thread-safe, if parallelism is required (e.g. for interrupting a method call).
  • Encapsulate thread-affinity.
  • Enable concurrent access to inter-thread objects (avoiding bottlenecks).

Dependencies

Personal tools