@Override
        public void run() {
            while(isRuning){
                Upload temp = null;
                //对任务队列的操作要上锁
                synchronized (taskQueue) {
                    //任务队列为空，等待新的任务加入
                    while(isRuning&&taskQueue.isEmpty()){
                        try {
                            taskQueue.wait(20);
                        } catch (InterruptedException e) {
                            System.out.println("InterruptedException occre...");
                            e.printStackTrace();
                        }
                    }
                    if(isRuning)
                        temp = taskQueue.remove(0);
                }
                //当等待新任务加入时候，终止线程(调用stopThread函数)造成 temp ＝ null
                if(temp!=null){
                    System.out.println("task info: "+temp.getInfo()+ " is begining");
                    isWaiting = false;
                    temp.uploadPic();
                    isWaiting = true;
                    System.out.println("task info: "+temp.getInfo()+ " is finished");
                }    
            }
        }