Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

For C++ MacOSX app, what threading library to use?

I'm on MacOSX, writing an app in C++.

What threading library should I use? pThreads? or is there something else?

Thanks!

like image 261
anon Avatar asked Jan 28 '10 02:01

anon


People also ask

What is a threading library?

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.

What is a thread Mac?

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.

What is program threading?

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.

What is Pthread in Linux?

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.


1 Answers

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).

like image 117
James McNellis Avatar answered Sep 20 '22 05:09

James McNellis