NutzCN Logo
问答 实现callable接口开启线程获取线程结果失败
发布于 1886天前 作者 yanteng0124 1637 次浏览 复制 上一个帖子 下一个帖子
标签:

如代码所示,ccPersonnelPretrialController.getFieldValueThread()这个方法进不去,会run()会报错,不知道怎么回事

@Autowired
	private CcPersonnelPretrialController ccPersonnelPretrialController;
	
	
	private int threadnum;//是第几个线程
	private int threadcount;//一共几个线程
	private int pagenum;//每个线程处理多少条数据
	private List<CcPersonnel> ccPersonnelList;
	private List<CcField> fieldList;
	private String[] title;
	private String [][] content;
	
	
	public ThreadWithCallbackUtils(List<CcPersonnel> ccPersonnelList, List<CcField> fieldList, String[] title, int threadnum, int pagenum, int threadcount){
		this.threadnum = threadnum;
		this.threadcount = threadcount;
		this.pagenum = pagenum;
		this.ccPersonnelList = ccPersonnelList;
		this.fieldList = fieldList;
		this.title = title;
	}
	
	@Override
	public String [][] call() throws Exception {
		// TODO Auto-generated method stub
		/*System.out.println("进入了call~~~~");
		String[][] fieldValueThread1 = ccPersonnelPretrialController.getFieldValueThread(ccPersonnelList, fieldList, title, threadnum, pagenum, threadcount);
		System.out.println("content1:"+fieldValueThread1);*/
		content = ccPersonnelPretrialController.getFieldValueThread(ccPersonnelList, fieldList, title, threadnum, pagenum, threadcount);
		return content;
	}
2 回复

是的,是一个公司外包项目,添加一个功能,出现了这个问题

添加回复
请先登陆
回到顶部