mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-22 09:38:48 +02:00
Libwalletqt: integrate changes from upstream
Co-authored-by: xiphon <xiphon@protonmail.com>
This commit is contained in:
@@ -68,6 +68,11 @@ QPair<bool, QFuture<void>> FutureScheduler::run(std::function<void()> function)
|
||||
// });
|
||||
//}
|
||||
|
||||
bool FutureScheduler::stopping() const noexcept
|
||||
{
|
||||
return Stopping;
|
||||
}
|
||||
|
||||
bool FutureScheduler::add() noexcept
|
||||
{
|
||||
QMutexLocker locker(&Mutex);
|
||||
|
||||
@@ -26,6 +26,7 @@ public:
|
||||
|
||||
QPair<bool, QFuture<void>> run(std::function<void()> function) noexcept;
|
||||
// QPair<bool, QFuture<QJSValueList>> run(std::function<QJSValueList()> function, const QJSValue &callback);
|
||||
bool stopping() const noexcept;
|
||||
|
||||
private:
|
||||
bool add() noexcept;
|
||||
@@ -62,7 +63,7 @@ private:
|
||||
size_t Alive;
|
||||
QWaitCondition Condition;
|
||||
QMutex Mutex;
|
||||
bool Stopping;
|
||||
std::atomic<bool> Stopping;
|
||||
};
|
||||
|
||||
#endif // FUTURE_SCHEDULER_H
|
||||
|
||||
Reference in New Issue
Block a user