Top "Pthreads" questions

Pthreads (POSIX Threads) is a standardised C-based API for creating and manipulating threads.

Pthread create as detached

I have a problem creating a thread as detached. Here's the code I wrote: void* testFunction() { pthread_attr_t attr; …

c pthreads detach
Wait on multiple condition variables on Linux without unnecessary sleeps?

I'm writing a latency sensitive app that in effect wants to wait on multiple condition variables at once. I've read …

c multithreading pthreads conditional-statements scheduling
linking pthread library issue

Am facing a problem that may be slightly complicated to explain and understand as giving the entire picture would be …

c linux makefile pthreads undefined-reference
undefined reference to `pthread_create' Error when making C++11 application with ASIO and std::thread

I set Eclipse (Actually Xilinx SDK but based on Eclipse), and g++4.9.2, to compile a project which uses standalone ASIO …

c++ c++11 pthreads stdthread
Why does pthread_cond_wait have spurious wakeups?

To quote the man page: When using condition variables there is always a Boolean predicate involving shared variables associated with …

c pthreads
When the main thread exits, do other threads also exit?

I have a problem about main threads and other threads in the same process. When the main function returns, do …

c multithreading pthreads
When to use pthread_cancel and not pthread_kill?

When does one use pthread_cancel and not pthread_kill?

pthreads
POSIX threads and signals

I've been trying to understand the intricacies of how POSIX threads and POSIX signals interact. In particular, I'm interested in: …

c pthreads signals
sem_init on OS X

I am working on some code which uses the pthread and semaphore libraries. The sem_init function works fine on …

c macos pthreads semaphore
Overhead of pthread mutexes?

I'm trying to make a C++ API (for Linux and Solaris) thread-safe, so that its functions can be called from …

c++ linux performance pthreads mutex