uid / collabode

collab + code = collabode
http://groups.csail.mit.edu/uid/collabode/
Other
28 stars 8 forks source link

Deadlock caused by syntax highlighter #57

Closed maxg closed 12 years ago

maxg commented 12 years ago

For certain kinds of edits (at least creating/removing fields and annotations), the syntax highlighter schedules a call to SemanticHighlightingPresenter.updatePresentation on the UI thread, which obtains fPositionLock and then calls synchronized methods of PadDocument.

However, other threads call e.g. synchronized PadDocument.replace which ends up making a synchronous callback to the highlighter, which then obtains fPositionLock.

Without changing the how PadDocuments are made threadsafe, straightforward solution is to use Display.asyncExec in PadCompilationUnitEditor.reconciled to make the callback asynchronous.

Hopefully that will not introduce other bugs?

(Imported from Bitbucket #57 reported by maxg on 2011-11-09)

maxg commented 12 years ago

Asynchronous callback in 674fd657d3e4b5fa8cc07ede64063edac8d2578a. (maxg on 2011-11-18)