D16218: [KDevelop/Core]: safe signal-handler implementation (WIP)

René J.V. Bertin noreply at phabricator.kde.org
Fri Oct 19 13:59:06 BST 2018


rjvbb updated this revision to Diff 43922.
rjvbb added a comment.


  Drops the potentially unsafe qDebug output in the signal handler, makes `handlingSignal` an `std::atomic_bool` (since we can use locks here anyway) and adds copious comments.
  
  Contrary to what I wrote before the 2-stage mechanism does work when the pipe is "flushed", and it turns out this is required to prevent multiple firing from QSocketNotifier (which seems to react to the presence of unread data on the pipe rather than to write operations, at least in Qt 5.9).
  
  This means `signalReceived` is somewhat redudant. I do actually like how this variable makes the mechanism use the last signal from a signal "burst" but am not married to it either.

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16218?vs=43662&id=43922

REVISION DETAIL
  https://phabricator.kde.org/D16218

AFFECTED FILES
  kdevplatform/shell/core.cpp
  kdevplatform/shell/core_p.h

To: rjvbb, #kdevelop, kfunk
Cc: aaronpuchert, brauch, kfunk, arrowd, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181019/f3c75b4a/attachment.html>


More information about the KDevelop-devel mailing list