1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 23:25:26 +02:00

[230399] [multithread] changes to stop CommandMiner threads when clients disconnect

This commit is contained in:
David McKnight 2008-05-06 14:29:29 +00:00
parent b3ef5f7dd0
commit 7e7d743984

View file

@ -16,6 +16,7 @@
* 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
* 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;
@ -25,6 +26,7 @@ package org.eclipse.rse.dstore.universal.miners;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.eclipse.dstore.core.miners.Miner;
import org.eclipse.dstore.core.model.DE;
@ -280,6 +282,20 @@ public class CommandMiner extends Miner
done = true;
}
}
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()
{