Fix warning by ThreadSanitizer in HttpLoader

master
David Capello 2022-05-30 19:41:41 -03:00
parent 6ce205e0db
commit 93dcc0349f
3 changed files with 7 additions and 4 deletions

2
laf

@ -1 +1 @@
Subproject commit 2d71ca692a60f50312b07f0521a0ffb5c3c9e32f
Subproject commit 68a44741998e5a769a9b952ddb422e993dc5b6a9

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2020 Igara Studio S.A.
// Copyright (C) 2020-2022 Igara Studio S.A.
// Copyright (C) 2001-2016 David Capello
//
// This program is distributed under the terms of
@ -46,7 +46,7 @@ void HttpLoader::abort()
void HttpLoader::threadHttpRequest()
{
try {
base::ScopedValue<bool> scoped(m_done, false, true);
base::ScopedValue<std::atomic<bool>, bool> scoped(m_done, false, true);
LOG("HTTP: Sending http request to %s\n", m_url.c_str());

View File

@ -1,4 +1,5 @@
// Aseprite
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2001-2016 David Capello
//
// This program is distributed under the terms of
@ -9,6 +10,8 @@
#pragma once
#include "base/thread.h"
#include <atomic>
#include <string>
namespace net {
@ -30,7 +33,7 @@ namespace app {
void threadHttpRequest();
std::string m_url;
bool m_done;
std::atomic<bool> m_done;
net::HttpRequest* m_request;
base::thread m_thread;
std::string m_filename;