Self-test questions

For multiple choice questions, choose all options that apply:

  1. What happens if you do not call join or detach on a boost::thread object and a std::thread object?

    a. join is called on underlying thread of boost::thread.

    b. std::terminate is called for std::thread, terminating the program.

    c. detach is called on underlying thread of boost::thread.

    d. detach is called on underlying thread of std::thread.

  2. What happens if an exception is allowed to propagate past the initial function with which a boost::thread object is created?

    a. The program is terminated via std::terminate.

    b. It is undefined behavior.

    c. The call to get on the future object throws an exception in the calling thread.

    d. The thread is terminated but the exception is not ...

Get Learning Boost C++ Libraries now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.