... is it save to replace the future of a watcher right after calling "cancel" on the watcher?
i.e.:
i have no particular use for the future returned by the concurrent filter, so i just simply set it to the watcher; also i don't connect the watcher signals, which only purpose is to cancel processing and immediately start processing a new sequence; the docs say that cancel is async, what'd be the preferred way in this case as i don't want to wait for the (now obsolete) previous processing results. i just wonder what happens internally if i do this that way from the outside it looks ok, and everything seems to work as expected...Qt Code:
m_watcher.cancel(); ProcessWrapper process; m_watcher.setFuture(QtConcurrent::filter(m_cacheQueue, process));To copy to clipboard, switch view to plain text mode
Bookmarks