From: Jérôme L. <lod...@us...> - 2014-02-14 05:52:16
|
I agree with Ethan that an event loop should not be necessary in qt_qterm.cpp. However, if someone wants to experiment, I have already made such an attempt to integrate a Qt event loop within the gnuplot event loop in http://sourceforge.net/p/gnuplot/patches/645/ in eventloop.patch Jérôme Le mercredi 12 février 2014 20:14:19 sfeam a écrit : > I don't agree that an event loop is needed for this particular purpose. > We don't have a case of asynchronous processes sending each other > signals at random times. We just want some way for the daughter > process to signal back to the parent process "I'm ready now, you can > proceed". And we want some way for the parent to wait for this > signal without burning CPU cycles. One would think from its name that > QLocalSocket::waitForConnected() provides exactly this service, but > evidently it doesn't. At least in linux it should be possible to have the > parent call sigwait(), and the daughter call kill(parent_pid, SIGUSR1). No > need to involve Qt in this. > > Ethan |