You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.
Chaining asyncfuture is useful to chain QFuture's together. Sometimes at the begin of the chain, it's useful to have completed QFuture that come from a fixed value. To achieve this with asyncfuture, a programmer needs to use deferred() and then complete it with deferred::complete(). Although this works, deferred creates a Deferred object and a that holds a DeferredFuture. A DeferredFuture is a fairly heavy weight object since inherits QObject and hold a mutex. A DeferrerFuture is usually stored as a shared object and require reference counting.
To reduce this overhead for the specific job having a QFuture that's automatically complete, I propose having a QFuture<void> finished() and QFuture<T> finished<T>() functions.
Chaining asyncfuture is useful to chain QFuture's together. Sometimes at the begin of the chain, it's useful to have completed QFuture that come from a fixed value. To achieve this with asyncfuture, a programmer needs to use deferred() and then complete it with deferred::complete(). Although this works, deferred creates a Deferred object and a that holds a DeferredFuture. A DeferredFuture is a fairly heavy weight object since inherits QObject and hold a mutex. A DeferrerFuture is usually stored as a shared object and require reference counting.
To reduce this overhead for the specific job having a QFuture that's automatically complete, I propose having a
QFuture<void> finished()
andQFuture<T> finished<T>() functions.
They would be implement as the following:
The text was updated successfully, but these errors were encountered: