Self-test questions
For multiple choice questions, choose all options that apply:
- What is the difference between
io_service::dispatch
andio_service::post
?a.
dispatch
returns immediately whilepost
runs the handler before returningb.
post
returns immediately whiledispatch
may run the handler on the current thread if it can, or it behaves like postc.
post
is thread-safe whiledispatch
is notd.
post
returns immediately whiledispatch
runs the handler - 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 throwd. The
io_service
is stopped - 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.