Re: 0.60 hangs at pthread_mutex_lock

Kevin Atkinson <[email protected]>
Newsgroups gmane.comp.gnu.aspell.devel
Message-ID <Pine.LNX.4.44.0404281543490.24764-100000@kevin-p3.atkinson.dhs.org>
OK.  Here is a fix.  I simply avoid calling copy and increment the 
refcount directly.

Index: common/cache-t.hpp
===================================================================
RCS file: /cvsroot/aspell/aspell/common/cache-t.hpp,v
retrieving revision 1.10
diff -u -r1.10 cache-t.hpp
--- common/cache-t.hpp  28 Feb 2004 22:21:06 -0000      1.10
+++ common/cache-t.hpp  28 Apr 2004 19:47:03 -0000
@@ -58,7 +58,7 @@
   Data * n = cache->find(key);
   //CERR << "Getting " << key << "\n";
   if (n) {
-    n->copy();
+    n->refcount++
     return n;
   }
   PosibErr<Data *> res = Data::get_new(key, config);
@@ -82,7 +82,7 @@
   Data * n = cache->find(key);
   //CERR << "Getting " << key << "\n";
   if (n) {
-    n->copy();
+    n->refcount++
     return n;
   }
   PosibErr<Data *> res = Data::get_new(key, config, config2);

-- 
http://kevin.atkinson.dhs.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.