Hi,
Sorry for the delay.
> Yes, please provide a short example with std::promise, which, afaiu, works
> for your use-case.
Below is a simplified example where a client calls an API function that blocks
until the result is actually available.
The request is sent to a queue, where a "server"
Hi Marc,
First: thanks for your suggestions.
> 1. Inherit your runnable from QRunnable and QFutureInterface
>In the ctor, call QFI::setRunnable(this).
>2. Create an instance of your runnable, call runnable.future() to get the
>QFuture end
> 3. Schedule the runnable on a thread pool (cf.
Hi Marc,
> You should be able to develop a QPromise/QPackagedTask with the current
> QFutureInterface already.
> At least as long as it's attached to some > QThreadPool.
> What, exactly, are you trying to do that requires a patch to QFI?
I am not aware of any QPackagedTask in Qt, only of
Hello,
There was a discussion about the "internal" class QFutureInterface a few months
ago on this list [1] about making QFuture/QFutureInterface more like
std::future/std::promise in C++11.
It seems this is not going to happen before Qt 6.
We have a use case for a promise though and the