This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
Open
Description
An example of this issue is if two futures being added to Combined(). If future1 finished before future2 has been added, this will complete() the Combined(). Even though in this use case, we want the code below to print out "Finished!" once both future1 and future2 are finished. If future1 is finished before future2 is added, Finished() will be prematurely, called.
auto combine = Combined() << future1 << future2;
combine.subscribe([]() { qDebug() << "Finished!"; }
I don't think this can be easily be fixed without api changes to how Combine() is handled. Perhaps it better to advocate using async on the main thread only. The deferred needs to have a proper context object to make this work correrctly. By default deferred is move to the main thread.
Metadata
Assignees
Labels
No labels