POSIX: Difference between revisions
Jump to navigation
Jump to search
(Created page with '== PThreads == Links: * [https://computing.llnl.gov/tutorials/pthreads/ POSIX Threads Programming], excellent introduction to pthreads, by Blaise Barney, at Lawrence Livermore …') |
|||
Line 5: | Line 5: | ||
* [https://computing.llnl.gov/tutorials/pthreads/ POSIX Threads Programming], excellent introduction to pthreads, by Blaise Barney, at Lawrence Livermore National Laboratory. |
* [https://computing.llnl.gov/tutorials/pthreads/ POSIX Threads Programming], excellent introduction to pthreads, by Blaise Barney, at Lawrence Livermore National Laboratory. |
||
* [http://en.wikipedia.org/wiki/POSIX_Threads POSIX Threads] (wikipedia) |
* [http://en.wikipedia.org/wiki/POSIX_Threads POSIX Threads] (wikipedia) |
||
;Advices |
|||
* For portability, always create ''joinable'' or ''detachable'' threads by setting explicitly the thread attribute (using <code>pthread_attr_getdetachstate</code>). This provides portability as not all implementations may create threads as joinable by default. |
Revision as of 10:49, 24 September 2011
PThreads
Links:
- POSIX Threads Programming, excellent introduction to pthreads, by Blaise Barney, at Lawrence Livermore National Laboratory.
- POSIX Threads (wikipedia)
- Advices
- For portability, always create joinable or detachable threads by setting explicitly the thread attribute (using
pthread_attr_getdetachstate
). This provides portability as not all implementations may create threads as joinable by default.