User:Kr/A Thread's Life/Library Example with SAL

From Apache OpenOffice Wiki
< User:Kr‎ | A Thread's Life
Revision as of 15:00, 5 October 2007 by Kr (Talk | contribs)

Jump to: navigation, search

SAL Thread Issues:

  • Missing pendant to "pthread_exit" / "ExitThread" and therefore also missing clean-up handlers etc.
  • Less capable cancellation mechanism compared to "pthread_cancel"
  • Different semantic of UNIX and Win32 implementations
  • Problematic "pthread_detach" in UNIX usage, likely leading to races if trying to join a thread.
  • Problematic "CloseHandle" in Win32 usage, only easily possible to create "detached" (daemon) threads if calling "osl_destroyThread" from within the new thread.

RFE:

  • Reliable thread cancellation mechanism ...
  • Result setting function. Needed in multi-thread keeping process alive scenario.
  • Passing of the "oslThread" object to the worker function, otherwise it must be explicitly passed with help of conditions etc.
Personal tools