D16218: [KDevelop/Core]: safe signal-handler implementation (WIP)
René J.V. Bertin
noreply at phabricator.kde.org
Sat Oct 20 10:51:16 BST 2018
rjvbb marked 5 inline comments as done.
rjvbb added inline comments.
INLINE COMMENTS
> aaronpuchert wrote in core.cpp:66
> The `atomic_` aliases are provided for compatibility with C code, I'd just use `std::atomic<bool>` directly.
your call, if you think it's more readable.
> aaronpuchert wrote in core.cpp:67-69
> Why keep `signalReceived` if you can get the same value from the pipe?
As I said, I find it awkward to use an IPC method to get a value that likely doesn't even come from another thread in the same process, and I can't shake the feeling that I might not read back the value I wrote.
Again, your call...
> aaronpuchert wrote in core.cpp:79-80
> Still not atomic.
>
> if (!handlingSignal.exchange(true)) {
Doh, of course.
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D16218
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/20181020/226177a0/attachment.html>
More information about the KDevelop-devel
mailing list