D28770: Avoid blocking the UI thread
Martin Tobias Holmedahl Sandsmark
noreply at phabricator.kde.org
Mon Apr 13 13:31:33 BST 2020
sandsmark added a comment.
In D28770#646989 <https://phabricator.kde.org/D28770#646989>, @broulik wrote:
> I don't fully understand the need for a thread here.
> It merely blocks because the API is synchronous and thus we create a nested eventloop.
> I don't think the writing and parsing of the cache file is a real bottleneck here.
I don't use any threading (unless I'm missing something)? I just rewrote it to remove the nested event loop and instead use the normal one, and switched from a mutex to a lockfile (I feel that is more appropriate for this usecase, QSaveFile is more for data integrity and not racing between applications in my head at least).
REPOSITORY
R292 KUnitConversion
REVISION DETAIL
https://phabricator.kde.org/D28770
To: sandsmark, ngraham, #frameworks, broulik
Cc: broulik, ngraham, kde-frameworks-devel, #frameworks, LeGast00n, cblack, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200413/8f6ab3c3/attachment.html>
More information about the Kde-frameworks-devel
mailing list