Hi,
I have two questions:
1. The docs state that you can cancel a mapped() operation, but not a run(). Why is that? The QFuture returned by run() still has a cancel() method. What happens when I call it?
2. Suppose I use QFuture<Foo> f = run( makeFoo ); what is the suggested strategy in the case that makeFoo might throw an exception? As it stands, this crashes the application, since Qt just allows exceptions to propagate up. I could certainly put a try/catch inside makeFoo, but I'd like to get the exception passed back to the GUI thread, for use in error handling (e.g. it might have information that needs to be presented to the user). Any thoughts on how to design this? My first impulse is that QFutureWatcher needs another signal, alongside finished() and cancelled(), to signal an exception. But maybe this isn't appropriate for QtConcurrent and I should do it all myself?