template<>
class CYIFuture<>
Void specialization of CYIFuture. This class doesn't hold a value, but instead simply holds a 'completed' state.
- See also
- CYIFuture<ResultType>
#include <thread/YiFuture.h>
|
| bool | SetCompleted () |
| | Equivalent to CYIFuture<>::Set(), but requires that the m_mutex be locked prior to calling this function. More...
|
| |
| void | ExclusiveLock () const |
| | Locks both this object and the associated task (if it exists). More...
|
| |
| void | ExclusiveUnlock () const |
| | Unlocks both this object and the associated task (if it exists). More...
|
| |
| void | NotifyStateChanged () const |
| | Notify waiters (e.g. threads blocked on calls to Wait, Get or Take) of state change. More...
|
| |
| bool | SetTask (CYITaskBase *pTask) |
| | Sets the task asssociated with this object to the provided task. Returns true if the task was associated successfully, false otherwise. Has no effect if a task has already been assigned, or if this future has been cancelled or had a value assigned already. More...
|
| |
| void | DisconnectFromTask () |
| | Removes the task reference, if it exists. If an associated task exists, an attempt is made at cancelling it. More...
|
| |
| bool | SetCancelledNonLocking () |
| | Sets the 'cancelled' flag on this object, if it hasn't been done already and the future hasn't had a value assigned to it. Will awaken all waiters if the cancellation was successful (and will trigger the Cancelled signal). Returns false if the future could not be cancelled. The caller must have m_mutex locked. More...
|
| |
| bool | WaitNonLocking () const |
| | Equivalent to the Wait() function, but the caller must have m_mutex locked. More...
|
| |
| bool | WaitNonLocking (uint64_t uTimeoutMs) const |
| | Equivalent to the Wait() function, but the caller must have m_mutex locked. More...
|
| |
| bool | CancelInternal (bool bWait) |
| |
|
| template<typename T > |
| class | CYITask |
| |
Marks this future as completed.
The future can only be set as completed once, and cannot be done if the future has been cancelled. A successful marking will result in the Completed signal being triggered as well as threads blocked on calls to Wait to wake up.
- Returns
- Returns true if the assignement succeeded.
Equivalent to CYIFuture<>::Set(), but requires that the m_mutex be locked prior to calling this function.
A signal triggered when this object is marked as completed.
The documentation for this class was generated from the following file: