vi icon indicating copy to clipboard operation
vi copied to clipboard

这个线程在做什么动作,有什么用处?

Open BennyChang0 opened this issue 6 years ago • 0 comments

void runCheckThread(){

    ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor(new VIThreadFactory("vi-envIgnite"));
    executorService.scheduleAtFixedRate(new Runnable() {
        @Override
        public void run() {
            try{
                if(waitTimes == 0 || waitTimes >MAXTIMES){

                    if(waitTimes != 0){
                        waitTimes = 0;
                    }
                    EnFactory.getEnApp().register();
                }
            }
            catch (Throwable e){
                logger.warn("self registration failed!", e);
            }finally {
                waitTimes++;
            }

        }
    }, 0, DEFAULTINTERVAL, TimeUnit.SECONDS);
}

BennyChang0 avatar Dec 04 '18 07:12 BennyChang0