locking foo ...

Noel Grandin noel at peralex.com
Wed Dec 4 04:13:59 PST 2013


On 2013-12-04 13:36, Michael Meeks wrote:
> Sure - the question really is how best to deal with the mess we have currently. It's not entirely clear that the above 
> scenario is even achievable with the functionality we've exposed to eg. scripting / Java users today =) someone needs 
> to sit down and carefully work through every threading use-case, and use of the SolarMutex across all the code. Then 
> they need to unwind the UNO appartment model (which was originally intended to be some sort of solution here), and 
> finally all the platform toolkit's thread safety / affinity & functionality in this area - which is really not a 
> trivial task. When we have all of that understood - at least in one brain, we can (perhaps) work out what to do for 
> the best =) ATB, Michael. 

That would be ideal, for sure.

But perhaps there is a way to get there that does not require
- genius-level IQ
- years of LO experience
- tons of time
?

Something like

(*) Change the UNO/scripting processing model to do something like
      while (Message m = readMessage() != null) {
           invokeOnMainThread(void f() {
               processMessage(m);
           });
      }

(*) add a configure debug option in SolarMutex that asserts if something touches it from outside the main thread

(*) gradually fix the places that assert until we get to a point where we can make the option always on in debug mode.



Disclaimer: http://www.peralex.com/disclaimer.html




More information about the LibreOffice mailing list