Thomas has informed me that the BeOS thread / timer issue has been 
covered on the list, so I won't get the discussion started all over 
again.

Basically, all I want to know is that if it would be reasonable, until 
a proper fix for the timer bugs are introduced, to add a lock around 
the timer fire call under BeOS?  This would prevent more than one 
thread from drawing a document currently being modified, such as when a 
keypress event occurs.

The keypress event occurs in the view thread, so when a refresh is 
currently taking place a line deletion causes a hard crash when the 
refresh thread redraws the deleted line.

The fix I propose:

static BLocker ThreadLocker;

In function _Timer_Proc

+ if( ThreadLocker.Lock() )
+ {
        pTimer->fire();
+       ThreadLocker.Unlock();
+ }

I don't see any reason why this can't be implemented as a temporary 
fix, and I also belive that releasing a new version under BeOS without 
either the timer bugs fixed or this patch would be a mistake.

Thoughts?

- Christopher



Reply via email to