tmf: Handle race between state system queries and diposal
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 5 Nov 2012 16:54:12 +0000 (11:54 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 5 Nov 2012 22:22:31 +0000 (17:22 -0500)
commit3b7f5abe7bbbb5e532a267bcf3e6b489abcf4841
tree9b9fa8bbf20fde84aa510acc2769fd3b907277fe
parent96345c5a7351a4f540c83aa7bd93454ce14556fc
tmf: Handle race between state system queries and diposal

It's possible that a state system gets disposed while a query
is ongoing (happens between two successive .getNextChild()
calls, for example).

Instead of implementing a convoluted reader-writer-lock, we can
just catch the ClosedChannelException and rethrow a
StateSystemDisposed exception.

Change-Id: I93f72860bbb94a63e86e7c6f51682af659599fe3
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/8520
Tested-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/IStateHistoryBackend.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/historytree/HT_IO.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/historytree/HistoryTree.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/internal/tmf/core/statesystem/historytree/HistoryTreeBackend.java
This page took 0.029306 seconds and 5 git commands to generate.