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:
parent
6f44ed3297
commit
eb8766b158
2 changed files with 20 additions and 0 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue