Boost.AFIO    Boost C++ Libraries
enqueued_task Class Reference

Effectively our own custom std::packaged_task<>, with copy semantics and letting us early set value to significantly improve performance. More...


Detailed Description

Effectively our own custom std::packaged_task<>, with copy semantics and letting us early set value to significantly improve performance.

Template Parameters:
class RThe return type of the callable which must be without parameters. Unlike `std::packaged_task<>`, this custom variant is copyable though each copy always refers to the same internal state. Early stl_future value setting is possible, with any subsequent value setting including that by the function being executed being ignored. Note that this behaviour opens the potential to lose exception state - if you set the stl_future value early and then an exception is later thrown, the exception is swallowed.

Definition at line 173 of file afio.hpp.


January, 2014

Copyright © 2013-2014 Niall Douglas, Cork, Ireland
Copyright © 2013 Paul Kirth, California
Documentation is generated by Doxygen