stason.org logo lotus


previous page: 13. (POSIX) How can I perform a join on any thread? (Programming)page up: Threads Programming FAQnext page: 15. Where can I find POSIX thread benchmarks? (Programming)

14. (DCE, UI, POSIX) After I create a certain number of threads, my program crashes (Programming)

 Books
 TULARC






















Description

This article is from the Threads Programming FAQ, by Bryan O'Sullivan bos@serpentine.com with numerous contributions by others.

14. (DCE, UI, POSIX) After I create a certain number of threads, my program crashes (Programming)

By default, threads are created non-detached. You need to perform a
join on each non-detached thread, or else storage will never be freed
up when they exit. As an alternative, you can create detached threads,
for which storage will be freed as soon as they exit. This latter
approach is generally better; you shouldn't create non-detached
threads unless you explicitly need to know when or if they exit.

 

Continue to:


Share and Enjoy

Bookmark this story so others can enjoy it:
  • digg
  • Reddit
  • del.icio.us
  • Furl
  • Wists

Tags

programming, software, coding, threads programming







TOP
previous page: 13. (POSIX) How can I perform a join on any thread? (Programming)page up: Threads Programming FAQnext page: 15. Where can I find POSIX thread benchmarks? (Programming)