Difference between revisions of "User:Kr/A Thread's Life"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Model for organizing threads in a process ...)
 
m (Notes: Typo.)
Line 26: Line 26:
 
===Notes===
 
===Notes===
 
* Threads may dynamically switch from one type to the other and vice versa.
 
* Threads may dynamically switch from one type to the other and vice versa.
* The "main" thread is the a holder thread.
+
* The "main" thread is a holder thread.
  
  
 
[[Category:Multi-Threading]]
 
[[Category:Multi-Threading]]

Revision as of 09:46, 3 September 2007

Status: draft


Two types of Threads

  • holder threads
  • holded threads

Holder Thread

  • Holder threads keep the process alife.
  • The last holder thread terminates the process.
  • Every holder thread must be detached, as no other thread is going to join it.

Examples

  • GUI dispatcher thread


Holded Thread

  • Holded threads don't keep the process alife.
  • Any holded thread needs to be joined (terminated / cancelled) when (indirectly) released by a holder thread.
  • Every holded thread must be joinable, as a holder thread is going to join it, latest during termination.

Examples

  • cache flushing threads


Notes

  • Threads may dynamically switch from one type to the other and vice versa.
  • The "main" thread is a holder thread.
Personal tools