Review Request 128890: Make e.g. Baloo::Query thread safe.
Anthony Fieroni
bvbfan at abv.bg
Sun Sep 11 18:37:14 UTC 2016
> On Септ. 11, 2016, 9:32 след обяд, Anthony Fieroni wrote:
> > src/engine/database.cpp, line 128
> > <https://git.reviewboard.kde.org/r/128890/diff/1/?file=476743#file476743line128>
> >
> > It's needed *m_env = 0;*
> > Or you can add method close to call it in all way.
>
> Christoph Cullmann wrote:
> I don't understand the comment ;)
> 1) m_env != null means valid atm, therefore I can call here close
> 2) after this, the destructor is over, no need to null it, if you access the database object after/during destruction, all is lost.
Missing m_env = 0 after closing call. It can lead crash it future use.
- Anthony
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128890/#review99103
-----------------------------------------------------------
On Септ. 11, 2016, 9:27 след обяд, Christoph Cullmann wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/128890/
> -----------------------------------------------------------
>
> (Updated Септ. 11, 2016, 9:27 след обяд)
>
>
> Review request for KDE Frameworks, Plasma and Boudhayan Gupta.
>
>
> Repository: baloo
>
>
> Description
> -------
>
> lmdb itself is thread safe (e.g. you can use the same env in multiple threads).
> Unfortunately, the Baloo::Database itself not, as open() might race against other open calls (we have one unique db object in baloo).
>
> => add non-recursive mutex (recursive mutex not needed, one just must avoid to call isOpen() or path() inside open, that is done, else no unit test works).
>
>
> Diffs
> -----
>
> src/engine/database.h e3bb175
> src/engine/database.cpp ec7ae2e
>
> Diff: https://git.reviewboard.kde.org/r/128890/diff/
>
>
> Testing
> -------
>
> Unit tests still work.
>
>
> Thanks,
>
> Christoph Cullmann
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160911/656e854c/attachment.html>
More information about the Plasma-devel
mailing list