win32/ComWorker: rename variable name to prevent ambiguous
This commit is contained in:
parent
18d3a5c12b
commit
bcb393628e
|
@ -52,17 +52,17 @@ public:
|
|||
using R = std::invoke_result_t<std::decay_t<Function>>;
|
||||
auto promise = std::make_shared<Promise<R>>();
|
||||
auto future = promise->get_future();
|
||||
Push([function = std::forward<Function>(function),
|
||||
promise = std::move(promise)]() mutable {
|
||||
Push([func = std::forward<Function>(function),
|
||||
prom = std::move(promise)]() mutable {
|
||||
try {
|
||||
if constexpr (std::is_void_v<R>) {
|
||||
std::invoke(std::forward<Function>(function));
|
||||
promise->set_value();
|
||||
std::invoke(std::forward<Function>(func));
|
||||
prom->set_value();
|
||||
} else {
|
||||
promise->set_value(std::invoke(std::forward<Function>(function)));
|
||||
prom->set_value(std::invoke(std::forward<Function>(func)));
|
||||
}
|
||||
} catch (...) {
|
||||
promise->set_exception(std::current_exception());
|
||||
prom->set_exception(std::current_exception());
|
||||
}
|
||||
});
|
||||
return future;
|
||||
|
|
Loading…
Reference in New Issue