I'm on MacOSX, writing an app in C++.
What threading library should I use? pThreads? or is there something else?
Thanks!
Thread libraries provide programmers with an API for creating and managing threads. Thread libraries may be implemented either in user space or in kernel space. The former involves API functions implemented solely within user space, with no kernel support.
Thread is a new IP-based smart home connectivity standard, akin to Zigbee or Z-wave. Thread-enabled devices create a mesh network that interconnects all of the different devices together. With a mesh network, they can all connect and expand their reach far further than any single device could connect on its own.
1. With computer programming, a thread is a small set of instructions designed to be scheduled and executed by the CPU independently of the parent process. For example, a program may have an open thread waiting for a specific event to occur or running a separate job, allowing the main program to perform other tasks.
POSIX Threads, commonly known as pthreads, is an execution model that exists independently from a language, as well as a parallel execution model. It allows a program to control multiple different flows of work that overlap in time.
Consider using something cross-platform, like Boost.Thread (one advantage of Boost.Thread is that it is very similar to the thread library proposed as part of C++0x, so in the future, moving will be simpler).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With