diff --git a/libs/pbd/downloader.cc b/libs/pbd/downloader.cc index 4ed2bf0a6e..1d561acaf4 100644 --- a/libs/pbd/downloader.cc +++ b/libs/pbd/downloader.cc @@ -82,14 +82,13 @@ Downloader::start () _cancel = false; _status = 0; /* unknown at this point */ - thr = std::thread (&Downloader::download, this); - return 0; + return 0 != (thread = PBD::Thread::create (boost::bind (&Downloader::download, this))); } void Downloader::cleanup () { - thr.join (); + thread->join (); } void diff --git a/libs/pbd/pbd/downloader.h b/libs/pbd/pbd/downloader.h index 19f8f46042..191bb95ab6 100644 --- a/libs/pbd/pbd/downloader.h +++ b/libs/pbd/pbd/downloader.h @@ -29,6 +29,8 @@ namespace PBD { +class Thread; + class LIBPBD_API Downloader { public: Downloader (std::string const & url, std::string const & destdir); @@ -58,7 +60,7 @@ class LIBPBD_API Downloader { std::atomic _download_size; /* read-only from requestor thread */ std::atomic _downloaded; /* read-only from requestor thread */ std::atomic _status; - std::thread thr; + PBD::Thread* thread; void download (); };