AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
AAsyncHolder Class Reference

Holds a set of futures keeping them valid. More...

#include <AUI/Thread/AAsyncHolder.h>

Public Member Functions#

template<typename T>
AAsyncHolderoperator<< (AFuture< T > future)
 
std::size_t size () const
 
void waitForAll ()
 

Detailed Description#

Warning
This API is experimental. Experimental APIs are likely to contain bugs, might be changed or removed in the future.
Unlike AFutureSet, AAsyncHolder is intended to hold void futures (AFuture<void>), however, non-void types can be also supported (but with extra overhead). When AFuture's task is complete, the AFuture is removed from AAsyncHolder.

Guarantees that held futures will never be executed or be during execution after AAsyncHolder is destroyed.

Cancels all futures in destructor.

Examples
examples/ui/infinite_lazy_list/src/main.cpp, and examples/ui/views/src/ExampleWindow.h.