Review Request 125300: Fix lock in KProtocolManager

David Faure faure at kde.org
Fri Sep 18 17:03:22 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125300/#review85628
-----------------------------------------------------------


Recursive mutexes are more costly and a symptom of bad programming. I'd much rather that we fix the recursive locking.

Any chance for a unittest? ;)

- David Faure


On Sept. 18, 2015, 4:38 p.m., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125300/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2015, 4:38 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Bugs: 350890
>     https://bugs.kde.org/show_bug.cgi?id=350890
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> We had a non-recursive mutex and we kept requesting it. Eventually it locked because we were locking the mutex when already locked.
> 
> An alternative fix could be to rearrange the code and release it sooner, but it doesn't seem worth it. (although I had to remove 2 asserts and I feel uneasy about it).
> 
> 
> Diffs
> -----
> 
>   src/core/kprotocolmanager.cpp 294ebdf 
> 
> Diff: https://git.reviewboard.kde.org/r/125300/diff/
> 
> 
> Testing
> -------
> 
> Tests pass, cannot reproduce the attached bug anymore.
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150918/fc9cdeec/attachment.html>


More information about the Kde-frameworks-devel mailing list