用C++解决问题第十版-第18章.pptVIP

  • 3
  • 0
  • 约2.8万字
  • 约 91页
  • 2022-03-09 发布于湖北
  • 举报
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Threads A thread is a separate computational process that runs concurrently You can think of a thread as a program that can run at the same time (in parallel) as other threads Useful for performance reasons and to prevent your program from blocking while waiting for input #include thread using std::thread; Slide 18- * Sample Program This program runs func() in two threads and main runs in a third thread void func(int a) { cout Hello World: a endl;

文档评论(0)

1亿VIP精品文档

相关文档