mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-06 23:52:31 -06:00
committed by
sledgehammer999
parent
ad4bdc0653
commit
c2f2a38582
@@ -3055,9 +3055,9 @@ QFuture<std::invoke_result_t<Func>> TorrentImpl::invokeAsync(Func &&func) const
|
||||
{
|
||||
QPromise<std::invoke_result_t<Func>> promise;
|
||||
const auto future = promise.future();
|
||||
promise.start();
|
||||
m_session->invokeAsync([func = std::forward<Func>(func), promise = std::move(promise)]() mutable
|
||||
{
|
||||
promise.start();
|
||||
promise.addResult(func());
|
||||
promise.finish();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user