What exactly is join() in Boost::thread? (C++)

后端 未结 2 1713
无人及你
无人及你 2020-12-16 18:26

In Java, I would do something like:

Thread t = new MyThread();
t.start();

I start thread by calling start() method. So later I can do somet

2条回答
  •  春和景丽
    2020-12-16 19:02

    Joining a thread does the same thing in Boost as it does in Java: it waits for the thread to finish running.

    Plus, if I remember correctly, Boost's threads run upon construction. You don't start them explicitly.

提交回复
热议问题