• Andy Wilkinson's avatar
    Avoid possible livelock when stopping FileSystemWatcher in parallel · 71c15cb6
    Andy Wilkinson authored
    Previously, if the file watcher thread tried to stop the
    FileSystemWatcher when another thread was already stopping it a
    livelock could occur. The livelock occurred because the file watcher
    thread would attempt to lock a monitor that was being held by a thread
    that had joined the file watcher thread and was waiting for it to die.
    
    This commit avoid the livelock by narrowing the synchronization that's
    used when stopping the FileSystemWatcher. The monitor is used to
    obtain a reference to the file watcher thread in a thread-safe manner,
    but it is released prior to joining the file watcher thread and
    waiting for it to die. This will allow a parallel attempt by the
    file watcher thread to stop itself to succeed.
    
    Closes gh-10496
    71c15cb6
Name
Last commit
Last update
.github Loading commit data...
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-test Loading commit data...
spring-boot-test-autoconfigure Loading commit data...
spring-boot-tools Loading commit data...
.editorconfig Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...