MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ drain()

template<typename T = void>
void MayaFlux::Parallel::AsyncGroup< T >::drain ( )
inline

Blocks until every currently submitted future completes.

Safe to call from any thread. Futures submitted concurrently by another thread during drain() are not guaranteed to be included; call drain() again if a caller needs a stronger guarantee after quiescing all submitters.

Definition at line 120 of file AsyncGroup.hpp.

121 {
122 m_tasks.drain([this](std::future<T>& f) { finish(f); });
123 }
void finish(std::future< T > &f)
Memory::SweepList< std::future< T > > m_tasks

References MayaFlux::Parallel::AsyncGroup< T >::finish(), and MayaFlux::Parallel::AsyncGroup< T >::m_tasks.

Referenced by MayaFlux::Yantra::ComputeMatrix::drain_async(), MayaFlux::IO::IOManager::wait_for_pending_saves(), and MayaFlux::Parallel::AsyncGroup< T >::~AsyncGroup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: