On 15.01.2011 22:20, Pavel Sanda wrote:
kuem...@lyx.org wrote:
Author: kuemmel
Date: Sat Jan 15 22:06:28 2011
New Revision: 37222
URL: http://www.lyx.org/trac/changeset/37222
Log:
Fix crash on Windows:
1. open LYX
2. CRTL-N
3. CRTL-D hold D --> crash
Graph must be thread save to fix this.
can you be more verbose? dont know this code but if i understand correctly this
only saves from more threads entering object at the same time. but what about
the sequence different threads enter successively this object. won't it make
chaos in internal structures?
When a thread enters a function which another thread is busy on it hangs
in the lock, if it wouldn't wait the the chaos would become even worse.
The mutex only guaranties that one operation is finished before the next starts.
disseminating mutexes all over the place smells like asking for deadlock,
hope you know how the graph code is entangled...
Yes, it is a risk, but we must make our code more thread safe if we don't
wanna have crashes "here and there".
secondly we should switch to the mode of asking bigger patches like this one
because of beta status, so we can make review before. eg this breaks tarball
release, since you forget makefile and scons file update.
Ah, I had the feeling that I have something forgotten, will fix it.
pavel