DevHeads.net

Review Request: Mutex cleanup in KSharedDataCache

Review request for kdelibs and Michael Pyne.

Description
- Remove "support" for thread-shared-only locks: they do not help at all but makes app crash instead of slowly work; lack of decent locks to be resolved later.
- Add error checking with console printouts.
- Consistently use "::" before global functions.

Probably failed mutexes should be destroyed in case of some errors, any thoughts?

This addresses bug 305023.
<a href="http://bugs.kde.org/show_bug.cgi?id=305023" title="http://bugs.kde.org/show_bug.cgi?id=305023">http://bugs.kde.org/show_bug.cgi?id=305023</a>

Diffs
kdecore/util/kshareddatacache_p.h ec5a7a0
kdecore/util/kshareddatacache.cpp 393902e

Diff: <a href="http://git.reviewboard.kde.org/r/106221/diff/" title="http://git.reviewboard.kde.org/r/106221/diff/">http://git.reviewboard.kde.org/r/106221/diff/</a>

Testing
On OpenBSD-CURRENT.

Thanks,

Vadim Zhukov

Comments

Re: Review Request: Mutex cleanup in KSharedDataCache

By Vadim Zhukov at 08/26/2012 - 15:02

(Updated Aug. 26, 2012, 7:02 p.m.)

Review request for kdelibs and Michael Pyne.

Changes
Fixed lie in comment.

Description
- Remove "support" for thread-shared-only locks: they do not help at all but makes app crash instead of slowly work; lack of decent locks to be resolved later.
- Add error checking with console printouts.
- Consistently use "::" before global functions.

Probably failed mutexes should be destroyed in case of some errors, any thoughts?

This addresses bug 305023.
<a href="http://bugs.kde.org/show_bug.cgi?id=305023" title="http://bugs.kde.org/show_bug.cgi?id=305023">http://bugs.kde.org/show_bug.cgi?id=305023</a>

Diffs (updated)
kdecore/util/kshareddatacache.cpp 393902e
kdecore/util/kshareddatacache_p.h ec5a7a0

Diff: <a href="http://git.reviewboard.kde.org/r/106221/diff/" title="http://git.reviewboard.kde.org/r/106221/diff/">http://git.reviewboard.kde.org/r/106221/diff/</a>

Testing
On OpenBSD-CURRENT.

Thanks,

Vadim Zhukov

Re: Review Request: Mutex cleanup in KSharedDataCache

By Vadim Zhukov at 08/27/2012 - 04:50

(Updated Aug. 27, 2012, 8:50 a.m.)

Review request for kdelibs and Michael Pyne.

Changes
Added error text printing, as requested by mpyne@.
Please note: strerror() is not thread-safe, so we have to use strerror_r(), which doesn't exists everywhere. So I've added another CMake check, and if it fails, still print error code directly.

Description
- Remove "support" for thread-shared-only locks: they do not help at all but makes app crash instead of slowly work; lack of decent locks to be resolved later.
- Add error checking with console printouts.
- Consistently use "::" before global functions.

Probably failed mutexes should be destroyed in case of some errors, any thoughts?

This addresses bug 305023.
<a href="http://bugs.kde.org/show_bug.cgi?id=305023" title="http://bugs.kde.org/show_bug.cgi?id=305023">http://bugs.kde.org/show_bug.cgi?id=305023</a>

Diffs (updated)
kdecore/util/ConfigureChecks.cmake fe9f47e
kdecore/util/config-util.h.cmake 83ccdf7
kdecore/util/kshareddatacache.cpp 393902e
kdecore/util/kshareddatacache_p.h ec5a7a0

Diff: <a href="http://git.reviewboard.kde.org/r/106221/diff/" title="http://git.reviewboard.kde.org/r/106221/diff/">http://git.reviewboard.kde.org/r/106221/diff/</a>

Testing
On OpenBSD-CURRENT.

Thanks,

Vadim Zhukov

Re: Review Request 106221: Mutex cleanup in KSharedDataCache

By Vadim Zhukov at 06/30/2014 - 19:02

(Updated July 1, 2014, 3:02 a.m.)

Status
This change has been discarded.

Review request for kdelibs and Michael Pyne.

Bugs: 305023
<a href="http://bugs.kde.org/show_bug.cgi?id=305023" title="http://bugs.kde.org/show_bug.cgi?id=305023">http://bugs.kde.org/show_bug.cgi?id=305023</a>

Repository: kdelibs

Description
- Remove "support" for thread-shared-only locks: they do not help at all but makes app crash instead of slowly work; lack of decent locks to be resolved later.
- Add error checking with console printouts.
- Consistently use "::" before global functions.

Probably failed mutexes should be destroyed in case of some errors, any thoughts?

Diffs
kdecore/util/ConfigureChecks.cmake fe9f47e
kdecore/util/config-util.h.cmake 83ccdf7
kdecore/util/kshareddatacache.cpp 393902e
kdecore/util/kshareddatacache_p.h ec5a7a0

Diff: <a href="https://git.reviewboard.kde.org/r/106221/diff/" title="https://git.reviewboard.kde.org/r/106221/diff/">https://git.reviewboard.kde.org/r/106221/diff/</a>

Testing
On OpenBSD-CURRENT.

Thanks,

Vadim Zhukov