mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 21:34:07 +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()
|
~ZimArticleRequest()
|
||||||
{
|
{
|
||||||
isCancelled.ref();
|
isCancelled.ref();
|
||||||
hasExited.acquire();
|
//hasExited.acquire();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1353,7 +1353,7 @@ public:
|
||||||
|
|
||||||
~ZimResourceRequestRunnable()
|
~ZimResourceRequestRunnable()
|
||||||
{
|
{
|
||||||
hasExited.release();
|
//hasExited.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void run();
|
virtual void run();
|
||||||
|
@ -1371,15 +1371,9 @@ class ZimResourceRequest: public Dictionary::DataRequest
|
||||||
QSemaphore hasExited;
|
QSemaphore hasExited;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
ZimResourceRequest(ZimDictionary &dict_, string const &resourceName_)
|
||||||
ZimResourceRequest( ZimDictionary & dict_,
|
: dict(dict_), resourceName(resourceName_) {
|
||||||
string const & resourceName_ ):
|
(new ZimResourceRequestRunnable(*this, hasExited))->run();
|
||||||
dict( dict_ ),
|
|
||||||
resourceName( resourceName_ )
|
|
||||||
{
|
|
||||||
(new ZimResourceRequestRunnable(*this, hasExited))->run();
|
|
||||||
// QThreadPool::globalInstance()->start(
|
|
||||||
// new ZimResourceRequestRunnable( *this, hasExited ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void run(); // Run from another thread by ZimResourceRequestRunnable
|
void run(); // Run from another thread by ZimResourceRequestRunnable
|
||||||
|
@ -1392,7 +1386,7 @@ public:
|
||||||
~ZimResourceRequest()
|
~ZimResourceRequest()
|
||||||
{
|
{
|
||||||
isCancelled.ref();
|
isCancelled.ref();
|
||||||
hasExited.acquire();
|
//hasExited.acquire();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue