Re: Multithreaded application freezing

Den 2015-02-05 18:46, Jasper St. Pierre skrev:

You can still deadlock with two different processes (getting your
protocol marshalling into a state where both processes are waiting
for an RPC reply from the other), and we've seen it with DBus
interfaces before.

Yes. You have to have a good protocol and include "commands" like
|reset| |restart| |begin| etc. 

Really, the ability to not hang relies on careful engineering and
understanding the tradeoffs of your system.

It always ends upp in designing a good state machine.

Having two socket connections to the X server isn't magical, and if
one processes hangs, then one window of your two-window application
is broken. To a typical user, that's just as good as the entire thing

Yes. You have to make a a good design.

And when the window that's still alive tries to make RPC to the hung
processes, well, now your entire application is toast.

No No No. This NEVER happens the way I program. In the worst case you
have to reset the state machine in the other program with a |restart|
and then you are back in buissines again. 


Göran Hasse
Raditex Control AB
OrgNr: 556611-8773
email: gorhas raditex nu
tel: 019-450105
mob: 070-5530148

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]