locking foo ...

Stephan Bergmann sbergman at redhat.com
Wed Dec 4 04:36:55 PST 2013


On 12/04/2013 01:13 PM, Noel Grandin wrote:
> (*) Change the UNO/scripting processing model to do something like
>       while (Message m = readMessage() != null) {
>            invokeOnMainThread(void f() {
>                processMessage(m);
>            });
>       }

...which deadlocks as soon as you have a synchronous call chain -> A -> 
B -> C where A and C are local and B is a callback to the remote site.

I have very little hopes that any "automatic" scheme will bring success 
here.  The only model that would IMO work is to have a single-threaded 
GUI (as virtually everybody else does too, for a reason), in the one 
direction offloading potentially time-consuming activities triggered by 
the GUI event loop to additional threads, and in the other direction 
dispatching GUI activities required by non-GUI code (e.g., URP, 
scripting) to the GUI event loop, explicitly coded.

Stephan


More information about the LibreOffice mailing list