Implement wxWebRequestCURL::Cancel()

This commit is contained in:
Tobias Taschner
2018-11-05 22:12:41 +01:00
parent fe4a5343f7
commit d2420a064c
2 changed files with 28 additions and 2 deletions

View File

@@ -13,6 +13,7 @@
#if wxUSE_WEBREQUEST_CURL
#include "wx/thread.h"
#include "wx/vector.h"
#include "curl/curl.h"
@@ -117,6 +118,8 @@ public:
bool StartRequest(wxWebRequestCURL& request);
void CancelRequest(wxWebRequestCURL* request);
protected:
wxThread::ExitCode Entry() wxOVERRIDE;
@@ -125,6 +128,8 @@ private:
wxCondition m_condition;
wxMutex m_mutex;
bool m_shuttingDown;
wxMutex m_cancelledMutex;
wxVector< wxObjectDataPtr<wxWebRequestCURL> > m_cancelledRequests;
void Initialize();