public void run() {
		int taskcount = 0;
		
		try {
			List<FutureTask<EntityBean>> futureTaskList = new ArrayList<FutureTask<EntityBean>>();
			ExecutorService exec = Executors.newFixedThreadPool(10);
			
			logger.info("ready for uploading----------------------------");
			
			long timemills = 0;
			
			while(true){
				EntityBean entity = concurrentLinkedQueue.poll();
				if(entity == null){
					if(timemills ==0){
						timemills = System.currentTimeMillis();
					} else {
						long endmills = System.currentTimeMillis();
						long diffmills = endmills - timemills;
						if(diffmills > queue_timeout) {
							logger.error("the queue is closed because of timeout, no more tasks to be submitted to the executor");
							break;
						}
					}
					logger.info("I am still alive, waiting for  ");
					Thread.sleep(1000);
					continue;
				} else if(ENDSINGEL.equals(entity.getStatus())) {
					logger.error("accepted FINISHED signal, ready to leave queue: " + entity.toString());
					break;
				} else {
					FutureTask<EntityBean> ft = new FutureTask<EntityBean>(new UploadImg(entity));
					logger.info("entity ready to submit upload task, info: " + entity.toString());
					futureTaskList.add(ft);
					exec.submit(ft);
					timemills = 0;
					taskcount++;
					logger.info(" task["+taskcount+"] is submitted");
				}
			}
			logger.info(" total submited "+ taskcount +" uploading tasks--------");
			//处理futureTask返回的值
//			long finishedCount = 0l;
//			for (FutureTask<EntityBean> tempFt : futureTaskList) {
//				EntityBean ret = null;
//				try {
//					ret = tempFt.get();
//					mdao.saveRecord(ret);
//					finishedCount++;
//				} catch (InterruptedException e) {
//					logger.error("InterruptedException occurred in MultiThreadUpload.run() ",e);
//				} catch (ExecutionException e) {
//					logger.error("ExecutionException  occurred in MultiThreadUpload.run() ",e);
//				} catch (Exception e){
//					logger.error("exception occurred while execute mdao.update("+ret.toString()+")",e);
//				}
//			}
			exec.shutdown();
		} catch(Exception e){
			e.printStackTrace();
			logger.error("", e);
		}	
		
	}