What is easiest way to create multithreaded applications with C/C++?

前端 未结 15 1552
遥遥无期
遥遥无期 2021-02-06 11:05

What is the easiest way to create multithreaded applications with C/C++?

相关标签:
15条回答
  • 2021-02-06 11:27

    pthreads!

    https://computing.llnl.gov/tutorials/pthreads/

    0 讨论(0)
  • 2021-02-06 11:29

    Just to mention it because it hasn't been mentioned: a compiler with OpenMP support (http://openmp.org/wp/)

    0 讨论(0)
  • 2021-02-06 11:29

    Posix Thread is quite good, they also come with great documentation and tutorials.

    Not as easy as java threads, but still quite good.

    0 讨论(0)
  • 2021-02-06 11:30

    I'm not sure about the easiest, but IMO the most user-friendly threading library is the one included in the Poco C++ project. For a preview have a look at the Thread.h header file.

    0 讨论(0)
  • 2021-02-06 11:33

    Qt has a pretty threading support and documentation but as others have cautioned this is not for beginners. The doc link I gave itself points to a short reading list

    0 讨论(0)
  • 2021-02-06 11:35

    There is no simple answer to this. It depends very heavily on what you hope to gain from multithreading, the platform/compiler, and which threading model you want to use. Every threading API has its pitfalls.

    And just because no one has mentioned it so far, OpenMP is another option that is supported in many modern mainstream compilers and is intended to simplify the use of concurrency. http://openmp.org/wp/

    0 讨论(0)
提交回复
热议问题