📄 ejecutorparapool.java
字号:
/* * 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -