On Wednesday 21 September 2005 21:32, Jeremy C. Reed wrote:
> On Sep. 21, leeming wrote:
> > However, the implementation of these functions (for Qt 3.3.4) suggests
> > that we should perhaps be calling "unlock(false)". Can you see if that
> > makes any difference?

> I am not sure what you mean. It never got to the unlock() for me in the
> first place. I had to remove the check for locked().

You mean that the call to locked() resulted in a SIGSEGV? My misunderstanding; 
I assumed that the crash was happening in unlock().

Anyway, trying to unlock a mutex that is already unlocked will result in 
undefined behaviour when using POSIX threads. See, for example Section 3.3.2 
"Locking and unlocking a mutex" of "Programming with POSIX threads" by David 
R Butenhof.

So, I'm not going to apply your fix; sorry.

> Or do you mean to add those QApplication::locked and  QApplication::unlock
> functions? If so, should I add them to same src/frontends/qt2/lyx_gui.C
> file?

No, I was just showing you their implementation in Qt 3.3.4.

Regards,
Angus

Reply via email to