diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-05-28 16:52:10 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-05-28 15:56:47 +0000 |
commit | f8319ebede962a9c89e192ab0496ba67fe2e4575 (patch) | |
tree | 8818a5909cd3cb2df2ad2a0a334ef3383bb0af06 /server | |
parent | b2137f5d4bd00e11142f31f542b0f8d6ea98f518 (diff) | |
download | vaadin-framework-f8319ebede962a9c89e192ab0496ba67fe2e4575.tar.gz vaadin-framework-f8319ebede962a9c89e192ab0496ba67fe2e4575.zip |
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
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/server/VaadinSession.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index 9939ad709e..551031b947 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -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 { |