tmf: Make TransientState really re-entrant
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 23 Jan 2014 23:25:40 +0000 (18:25 -0500)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 27 Jan 2014 19:36:10 +0000 (14:36 -0500)
Wrap all reading and writing methods under a reader-writer lock.
This will allow much better consistency when querying a state
system while it is being built.

It was also required to rework the hasInfoAbout() method. Since the
state of the TransientState can change between two method invocations,
it was prone to race conditions. Now it will return the interval it
had at the time, if there is one.

Change-Id: I1a34e410eea1a02288c5388d1983e9c16ce56f0f
Reviewed-on: https://git.eclipse.org/r/21019
Tested-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
IP-Clean: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>

No differences found
This page took 0.02988 seconds and 5 git commands to generate.