Bug 577265: Handle the unlikely race in close() method

There was a race between checking the fThread for null and seting it
to null. This could lead to that two parallel calls to close() could
be made and the 2nd call would get an NPE.

Change-Id: Ia107f6c84c4092a09027c691646e343d400ca6d4
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.debug/+/187734
Reviewed-by: Jonah Graham <jonah@kichwacoders.com>
Reviewed-by: Sarika Sinha <sarika.sinha@in.ibm.com>
Tested-by: Sarika Sinha <sarika.sinha@in.ibm.com>
2 files changed