mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*RichText: Resolved deadlock situation
git-svn-id: svn://ultimatepp.org/upp/trunk@5255 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f5932f9add
commit
9bdfc68c2d
3 changed files with 6 additions and 10 deletions
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
NAMESPACE_UPP
|
||||
|
||||
static StaticMutex sCacheMutex;
|
||||
|
||||
Array<RichPara>& RichPara::Cache()
|
||||
{
|
||||
static Array<RichPara> x;
|
||||
|
|
@ -26,7 +24,7 @@ RichPara::RichPara()
|
|||
RichPara::~RichPara()
|
||||
{
|
||||
if(cacheid && !part.IsPicked() && !incache) {
|
||||
Mutex::Lock __(sCacheMutex);
|
||||
DrawLock __;
|
||||
Array<RichPara>& cache = Cache();
|
||||
incache = true;
|
||||
cache.InsertPick(0, *this);
|
||||
|
|
@ -568,7 +566,7 @@ void RichPara::Unpack(const String& data, const Array<RichObject>& obj,
|
|||
format = style;
|
||||
|
||||
if(cacheid) {
|
||||
Mutex::Lock __(sCacheMutex);
|
||||
DrawLock __;
|
||||
Array<RichPara>& cache = Cache();
|
||||
for(int i = 0; i < cache.GetCount(); i++)
|
||||
if(cache[i].cacheid == cacheid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue