1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 01:15:29 +02:00

Check if thread is already disposed in the CDI event handler because the array of listeners used by EventManager in some situations is not up to date.

This commit is contained in:
Mikhail Khodjaiants 2003-01-14 22:26:53 +00:00
parent 6f44ed3297
commit eb8766b158
2 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2003-01-14 Mikhail Khodjaiants
Check if thread is already disposed in the CDI event handler because the array of listeners used by EventManager
in some situations is not up to date.
* CThread.java
2003-01-14 Alain Magloire
* src/org/eclipse/cdt/debug/core/cdi/ICDIVariableManager.java: New file.

View file

@ -112,6 +112,8 @@ public class CThread extends CDebugElement
private int fLastStackDepth = 0;
private boolean fDisposed = false;
/**
* Constructor for CThread.
* @param target
@ -418,6 +420,8 @@ public class CThread extends CDebugElement
*/
public void handleDebugEvent( ICDIEvent event )
{
if ( isDisposed() )
return;
ICDIObject source = event.getSource();
if ( source == null )
return;
@ -766,6 +770,7 @@ public class CThread extends CDebugElement
protected void terminated()
{
setRunning( false );
dispose();
cleanup();
fireTerminateEvent();
}
@ -1138,4 +1143,14 @@ public class CThread extends CDebugElement
return this;
return super.getAdapter(adapter);
}
protected void dispose()
{
fDisposed = true;
}
protected boolean isDisposed()
{
return fDisposed;
}
}