mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 17:24:08 +00:00
zim dictionary:remove semphore
This commit is contained in:
parent
4157fb387e
commit
8e6f4c2c10
18
zim.cc
18
zim.cc
|
@ -1188,7 +1188,7 @@ public:
|
|||
~ZimArticleRequest()
|
||||
{
|
||||
isCancelled.ref();
|
||||
hasExited.acquire();
|
||||
//hasExited.acquire();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1353,7 +1353,7 @@ public:
|
|||
|
||||
~ZimResourceRequestRunnable()
|
||||
{
|
||||
hasExited.release();
|
||||
//hasExited.release();
|
||||
}
|
||||
|
||||
virtual void run();
|
||||
|
@ -1371,15 +1371,9 @@ class ZimResourceRequest: public Dictionary::DataRequest
|
|||
QSemaphore hasExited;
|
||||
|
||||
public:
|
||||
|
||||
ZimResourceRequest( ZimDictionary & dict_,
|
||||
string const & resourceName_ ):
|
||||
dict( dict_ ),
|
||||
resourceName( resourceName_ )
|
||||
{
|
||||
(new ZimResourceRequestRunnable(*this, hasExited))->run();
|
||||
// QThreadPool::globalInstance()->start(
|
||||
// new ZimResourceRequestRunnable( *this, hasExited ) );
|
||||
ZimResourceRequest(ZimDictionary &dict_, string const &resourceName_)
|
||||
: dict(dict_), resourceName(resourceName_) {
|
||||
(new ZimResourceRequestRunnable(*this, hasExited))->run();
|
||||
}
|
||||
|
||||
void run(); // Run from another thread by ZimResourceRequestRunnable
|
||||
|
@ -1392,7 +1386,7 @@ public:
|
|||
~ZimResourceRequest()
|
||||
{
|
||||
isCancelled.ref();
|
||||
hasExited.acquire();
|
||||
//hasExited.acquire();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue