FastLED 3.9.15
Loading...
Searching...
No Matches

◆ cleanup_completed_promises()

void fl::FetchManager::cleanup_completed_promises ( )

Definition at line 164 of file fetch.cpp.

164 {
165 // Rebuild vector without completed promises
166 fl::vector<fl::promise<response>> active_promises;
167 for (const auto& promise : mActivePromises) {
168 if (promise.valid() && !promise.is_completed()) {
169 active_promises.push_back(promise);
170 }
171 }
172 mActivePromises = fl::move(active_promises);
173}
fl::vector< fl::promise< response > > mActivePromises
Definition fetch.h:269
void push_back(const T &value)
Definition vector.h:552
constexpr remove_reference< T >::type && move(T &&t) noexcept
Definition move.h:27
HeapVector< T, Allocator > vector
Definition vector.h:1214

References fl::promise< T >::is_completed(), mActivePromises, fl::move(), fl::HeapVector< T, Allocator >::push_back(), and fl::promise< T >::valid().

Referenced by update().

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