mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-17 22:15:23 +02:00
[230399] [multithread] changes to stop CommandMiner threads when clients disconnect
This commit is contained in:
parent
b3ef5f7dd0
commit
7e7d743984
1 changed files with 16 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
||||||
* David McKnight (IBM) - [202822] cancelled output should be created before thread cleanup
|
* David McKnight (IBM) - [202822] cancelled output should be created before thread cleanup
|
||||||
* David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
|
* David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
|
||||||
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients
|
||||||
|
* Noriaki Takatsu (IBM) - [230399] [multithread] changes to stop CommandMiner threads when clients disconnect
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.dstore.universal.miners;
|
package org.eclipse.rse.dstore.universal.miners;
|
||||||
|
@ -25,6 +26,7 @@ package org.eclipse.rse.dstore.universal.miners;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.dstore.core.miners.Miner;
|
import org.eclipse.dstore.core.miners.Miner;
|
||||||
import org.eclipse.dstore.core.model.DE;
|
import org.eclipse.dstore.core.model.DE;
|
||||||
|
@ -281,6 +283,20 @@ public class CommandMiner extends Miner
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void finish()
|
||||||
|
{
|
||||||
|
Iterator pools = _threads.entrySet().iterator();
|
||||||
|
while (pools.hasNext())
|
||||||
|
{
|
||||||
|
Map.Entry entry = (Map.Entry)pools.next();
|
||||||
|
CommandMinerThread process = (CommandMinerThread) entry.getValue();
|
||||||
|
process.sendExit();;
|
||||||
|
}
|
||||||
|
|
||||||
|
_threads.clear();
|
||||||
|
super.finish();
|
||||||
|
}
|
||||||
|
|
||||||
public String getVersion()
|
public String getVersion()
|
||||||
{
|
{
|
||||||
return "8.0.0"; //$NON-NLS-1$
|
return "8.0.0"; //$NON-NLS-1$
|
||||||
|
|
Loading…
Add table
Reference in a new issue