class suspended_task
Defined at line 1513 of file ../../sdk/lib/fit-promise/include/lib/fpromise/promise.h
Represents a task that is awaiting resumption.
This object has RAII semantics. If the task is not resumed by at least
one holder of its |suspended_task| handles, then it will be destroyed
by the executor since it is no longer possible for the task to make
progress. The task is said have been "abandoned".
See documentation of |fpromise::executor| for more information.
Public Methods
void suspended_task (const suspended_task & other)
Defined at line 9 of file ../../sdk/lib/fit-promise/promise.cc
void suspended_task (suspended_task && other)
Defined at line 13 of file ../../sdk/lib/fit-promise/promise.cc
void ~suspended_task ()
Releases the task without resumption.
Does nothing if this object does not hold a ticket.
Defined at line 18 of file ../../sdk/lib/fit-promise/promise.cc
void swap (suspended_task & other)
Swaps suspended tasks.
Defined at line 50 of file ../../sdk/lib/fit-promise/promise.cc
suspended_task & operator= (const suspended_task & other)
Defined at line 31 of file ../../sdk/lib/fit-promise/promise.cc
suspended_task & operator= (suspended_task && other)
Defined at line 40 of file ../../sdk/lib/fit-promise/promise.cc
void suspended_task ()
Defined at line 1567 of file ../../sdk/lib/fit-promise/include/lib/fpromise/promise.h
void suspended_task (resolver * resolver, ticket ticket)
Defined at line 1569 of file ../../sdk/lib/fit-promise/include/lib/fpromise/promise.h
bool operator bool ()
Returns true if this object holds a ticket for a suspended task.
Defined at line 1580 of file ../../sdk/lib/fit-promise/include/lib/fpromise/promise.h
void resume_task ()
Asks the task's executor to resume execution of the suspended task
if it has not already been resumed or completed. Also releases
the task's ticket as a side-effect.
Clients should call this method when it is possible for the task to
make progress; for example, because some event the task was
awaiting has occurred. See documentation on |fpromise::executor|.
Does nothing if this object does not hold a ticket.
Defined at line 1591 of file ../../sdk/lib/fit-promise/include/lib/fpromise/promise.h
void reset ()
Releases the suspended task without resumption.
Does nothing if this object does not hold a ticket.
Defined at line 1596 of file ../../sdk/lib/fit-promise/include/lib/fpromise/promise.h