Specialization of FutureImpl<void> for internal convenience. This does nothing useful!
More...
#include <future.h>
|
| void | add_to_assignments (const std::shared_ptr< FutureImpl< void > > f) |
| | Pass by value with implied copy to manage lifetime of f.
|
| void | set_assigned (const void &value) |
| | Spinlock (int junk=0) |
| | Make and initialize a spinlock ... initial state is unlocked.
|
| virtual | ~Spinlock () |
| void | lock () const |
| | Acquire the spinlock waiting if necessary.
|
| bool | try_lock () const |
| | Try to acquire the spinlock ... return true on success, false on failure.
|
| void | unlock () const |
| | Free a spinlock owned by this thread.
|
Specialization of FutureImpl<void> for internal convenience. This does nothing useful!
◆ assignmentT
◆ callbackT
◆ FutureImpl()
Constructor that uses a local unassigned value.
◆ ~FutureImpl()
Destructor.
- Todo
- Perhaps a comment about its behavior.
◆ add_to_assignments()
Pass by value with implied copy to manage lifetime of f.
- Todo
- Description needed.
- Parameters
-
◆ get()
Gets/forces the value, waiting if necessary.
- Parameters
-
| dowork | If true (default) and the future is not ready this thread will execute other tasks while waiting |
- Warning
- PaRSEC backend does not support dowork=true from a callstack containing a running MADNESS task already, hence must use dowork=false when need to call from within a task
- Returns
- reference to the contained value
- Precondition
- this->is_local()
◆ is_local()
- Todo
- Brief description needed.
- Todo
- Description needed.
- Returns
- Description needed.
◆ probe()
Checks if the value has been assigned.
- Returns
- True if the value has been assigned; false otherwise.
◆ register_callback()
Registers a function to be invoked when future is assigned.
Callbacks are invoked in the order registered. If the future is already assigned, the callback is immediately invoked.
- Todo
- Description needed.
- Parameters
-
| callback | Description needed. |
◆ replace_with()
- Todo
- Brief description needed.
- Todo
Is this function needed?
Details needed.
- Parameters
-
- Returns
- Description needed.
◆ set()
Sets the value of the future (assignment).
- Todo
- Descriptions needed.
- Template Parameters
-
- Parameters
-
| [in] | value | Description needed. |
◆ set_assigned()
- Todo
- Brief description needed.
Invoked locally by set routine after assignment.
- Todo
- Description needed.
- Parameters
-
| [in] | value | Description needed. |
◆ set_handler()
AM handler for remote set operations.
- Todo
- Description needed.
- Parameters
-
| [in] | arg | Description needed. |
◆ Future< T >
◆ operator<<
| std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const Future< void > & | f ) |
|
friend |
Human readable printing of a Future to a stream.
Stream output operator for a future.
- Template Parameters
-
- Parameters
-
| [in,out] | out | The output stream. |
| [in] | f | The future. |
- Returns
- The output stream.
- Todo
- Brief description needed.
- Todo
- Descriptions needed.
- Template Parameters
-
- Parameters
-
| [in,out] | The | output stream. |
| [in] | f | The future to be output. |
- Returns
- The output stream.
References madness::f.
◆ assigned
A flag indicating if the future has been set.
◆ assignments
A stack that stores future objects that are set to the same value as this future, once it has been set.
◆ callbacks
A stack that stores callbacks that are invoked once the future has been assigned.
◆ MAXCALLBACKS
The static stack size used for callbacks and future assignment used for small stack size optimizations.
◆ remote_ref
Reference to a remote future pimpl.
The documentation for this class was generated from the following file: