读书人

BoneCP源码BoneCP中施用的多线程

发布时间: 2013-03-17 13:48:31 作者: rapoo

BoneCP源码——BoneCP中使用的多线程
//@Overridepublic void run() {try {this.connectionHandle.setThreadWatch(Thread.currentThread());// wait for the thread we're monitoring to die off.this.threadToMonitor.join(this.closeConnectionWatchTimeout);if (!this.connectionHandle.isClosed() && this.threadToMonitor.equals(this.connectionHandle.getThreadUsingConnection())){logger.error(this.stackTrace);}} catch (Exception e) {// just kill off this threadif (this.connectionHandle != null){ // safetythis.connectionHandle.setThreadWatch(null);}} }?

?

读书人网 >开源软件

热点推荐