eclipse / buildship

The Eclipse Plug-ins for Gradle project.
528 stars 167 forks source link

Move model creation outside of synchronized block #1289

Closed reinsch82 closed 7 months ago

reinsch82 commented 7 months ago

Fixes https://github.com/eclipse/buildship/issues/1275

The deadlock seems to happen because DefaultModelPersistence.this.lock is still locked when PersistentModelConverter.toModel is called. Since the purpose of the lock is to synchronise access to the content of the property file this is not necessary. This change moves the call to PersistentModelConverter.toModel outside of the lock and should therefore avoid the deadlock situation.

donat commented 7 months ago

The changes passed CI; merging.