Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

enqueued_task< R()>

Synopsis
template<class R>
class enqueued_task< R()>
      : public detail::enqueued_task_impl< R >
{
  // ...
};
Template parameter(s)

Parameter

Description

class R

Member Function(s)

Function

Description

Parameters

Returns

bool valid()

Returns true if valid.

void swap(enqueued_task_impl & o)

Swaps contents with another instance.

enqueued_task_impl &: o:

void reset()

Resets the contents.

void set_task(std::function< R()> _task)

Sets the task.

std::function< R()>: _task:

const shared_future< R > & get_future()

Returns the shared stl_future corresponding to the stl_future return value of the task.

template<class T>
void set_future_value(T v)

Sets the shared stl_future corresponding to the stl_future return value of the task.

T: v:

void set_future_value()
void set_future_exception(exception_ptr e)

Sets the shared stl_future corresponding to the stl_future return value of the task.

exception_ptr: e:

void disable_auto_set_future(bool v = true)

Disables the task setting the shared stl_future return value.

bool: v:

enqueued_task(std::function< R()> _task = std::function< R()>())

Default constructor.

std::function< R()>: _task:

void operator()()

Invokes the callable, setting the shared stl_future to the value it returns.

Header

#include <boost/afio/v2/afio.hpp>


PrevUpHomeNext