Self-test questions

For multiple choice questions, choose all options that apply:

  1. What is the difference between io_service::dispatch and io_service::post?

    a. dispatch returns immediately while post runs the handler before returning

    b. post returns immediately while dispatch may run the handler on the current thread if it can, or it behaves like post

    c. post is thread-safe while dispatch is not

    d. post returns immediately while dispatch runs the handler

  2. What happens if a handler throws an exception when it is dispatched?

    a. It is undefined behavior

    b. It terminates the program with a call to std::terminate

    c. The call to run, on the io_service that dispatched the handler, will throw

    d. The io_service is stopped

  3. What is the role of the unspecified address ...

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.