Browse Source

Avoid deadlock checking in runPendingAccessTasks() (#11897)

The deadlock check in accessSynchronously() was triggered in cases where
one session was locked and tryLock() in access() did manage to lock
another session and thus attempted to run the runnable right away.

runPendingAccessTasks() needed accessSynchronously() just for setting up
the current session instance - the session was already locked and
cleaning up the CurrentInstance values afterwards was not needed. Just
setting the current session without accessSynchronously() gets rid of
the inappropriate deadlock detection as well as some overhead with
managing locks and CurrentInstance values.

Change-Id: Ib956d68884d6703dce2633a455c4857bb06651af
tags/7.1.0
Leif Åstrand 11 years ago
parent
commit
f8319ebede
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      server/src/com/vaadin/server/VaadinSession.java

+ 2
- 1
server/src/com/vaadin/server/VaadinSession.java View File

@@ -1263,7 +1263,8 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
if (!pendingAccess.isCancelled()) {
CurrentInstance.clearAll();
CurrentInstance.restoreInstances(pendingAccess.instances);
accessSynchronously(pendingAccess);
CurrentInstance.setCurrent(this);
pendingAccess.run();
}
}
} finally {

Loading…
Cancel
Save