ejecutorparapool.java
来自「java 实现的P2P Chord算法。chord算法是结构式的P2P搜索与管理」· Java 代码 · 共 46 行
JAVA
46 行
/* * EjecutorParaPool.java * * Created on 14 de abril de 2005, 15:49 */package org.mikel.jchord.red;/** * * @author mikel */public class EjecutorParaPool extends Thread { private GestorPooling gestor; /** Creates a new instance of ThreadGestionado */ public EjecutorParaPool(GestorPooling gestor) { this.gestor = gestor; this.start(); } public void run(){ try{ while(true) gestor.esperarEjecucion(this); } catch (InterruptedException ie) { } } void ejecutar(Runnable r){ try{ r.run(); } catch(Exception e){ //se captura la excepci髇 para que el ejecutor pueda seguir ejecutando otros trabajos } } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?