Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能不能这个地方改成多线程呢 #5

Open
aa1678066774 opened this issue Dec 20, 2019 · 1 comment
Open

能不能这个地方改成多线程呢 #5

aa1678066774 opened this issue Dec 20, 2019 · 1 comment

Comments

@aa1678066774
Copy link

// 开始查询余票
Ticket ticket = new Ticket(this.session, this.trainDate, this.fromStation, this.toStation);

// String[] split = this.trainDates.split(",");
// int len = split.length;
// ExecutorService executorService = Executors.newFixedThreadPool(len);
stopLop: while (true) {
HttpResponse httpResponse;
try {
httpResponse = ticket.query();
} catch (HttpException e) {
log.info("请求超时,或无法访问,错误信息:{}", e.getMessage());
continue;
}
这个地方咋不能用多线程呀

@kalvinGit
Copy link
Owner

可以,开始有考虑过,怕刷得太频繁封IP,想着想着就又没加上去了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants