D23721: Fix race condition in TextBuffer

Christoph Cullmann noreply at phabricator.kde.org
Wed Sep 4 17:53:35 BST 2019


cullmann added a comment.


  Hmm, the use of atomic + a local var might avoid that the compiler optimizes away the local var and just uses m_lastUsedBlock again directly, but I am not sure if we should go that way.
  If one has concurrent accesses to the buffer from different threads, all is lost, as no part of  the buffer is really thread save. (e.g. it will still random crash if the buffer is modified in the main thread).

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D23721

To: thomassc, #ktexteditor
Cc: cullmann, kwrite-devel, kde-frameworks-devel, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190904/1901231a/attachment-0001.html>


More information about the KWrite-Devel mailing list